The 2nd chapter begins to learn C + +
1. Endl ensure that the output is refreshed before the program continues to run (it is immediately displayed on the screen), and that using "\ n" does not provide such a guarantee, which means that in some systems, it is sometimes possible to prompt after you enter information.
2. Keywords and parentheses in C + + can add spaces or no
return (0);
return (0);
int main ();
int main ();
are legal.
But Return0, there must be a space in the middle.
3. The statement statement indicates the location of the information store and the required memory space. int carrots;
4. The Insert operator (<<) defined by the Ostream class makes it possible for data to be inserted into the output stream, and the extraction operator (>>) defined by the IStream class can extract information from the input stream.
C + + Primer Plus reading notes-the 2nd chapter begins to learn C + +