1.cout using Endl,cin without Endl
1 cin>>a>>2 cout<<a<<b<<endl;
2. Do not add a semicolon after the definition of the function, it is finished.
1 int A (int b)2{3 // processing statement 4 return(); 5 }
The input of the string in 3.c++ is used char[] and strcpy (A, "...") and the header file stdio.h;
1 Char a[]; 2 strcpy (A," " )
4.c++ output white space with << "" to output, unlike the C language
1 cout<<"a="<<" <<Endl; 2 printf ("a=%d", a);
5. Variable names cannot be the same as function names
6. Integer and floating-point type cannot be mixed together to calculate, error
7. Do not forget to add return 0 at the end of the main function;
8. There is no semicolon after the definition name of the class, there is a semicolon after the definition, there is no semicolon after the function definition name, and no semicolon is defined.
1 class class name 2 {3 Public : 4 // Public Part 5 Private : 6 // Private Part 7 };
C + + Pay attention to easy error points