From today onwards, began to learn C + + language, to set a goal for themselves, is to take every day to learn things to do notes, record their own learning process, also in order not to give themselves lazy opportunities, haha.
。。。。。
Open VS2015, create engineering and source files, write the first HelloWorld program
1 #include <iostream>2 3 using namespace std;4 5 int{7 cout << "Hello world!" << endl;
8 return 0; 9}
Successfully printed Hello world!, heart excited. The following analysis of this program
#include <iostream> is used to include the C + + standard Input Output header file (same as the C language, # include <stdio.h> function).
using namespace Std; The use of namespaces, which is introduced by C + +, is mainly to solve the problem of duplication of variable names and function names in large projects.
cout<< "Hello world!" << Endl; Print Hello world!
This Hello world! program although short, but embodies the C + + language and C language differences, so, when learning C + + language, should be correct attitude, with a new way of thinking to see C + +, while comparing C and C + +, in the process of learning C + +, enhance the C + + The understanding.
Getting Started with C + + First day (Hello world)