1, characters in C + + is the data stream, such as output Hello world! , you can use cout<< "Hello world!" The output of the string, cout is defined in iostream, is also the input and output stream.
Output string wrapping can be done in two ways, one using the escape character \ n, and the other using Endl, both of which are newline, but the difference is that Endl immediately refreshes the display area, which may not be the case in some environments.
2, the introduction of the class:
A class is a user-defined type of data that the class is to an object like a type to a variable.
Because did not learn object-oriented programming, the above sentence for the description of the class is still not very understand, Baidu one, explained as follows:
A class is an abstraction of an object, and an object is a concrete instance of a class. Classes are abstract, do not occupy memory, and objects are specific and occupy storage space. A class is a blueprint for creating objects, which is a software template that defines methods and variables that are included in a particular type of object.
Thinking over and over for a while, it may be that the class can be the same as the type, such as int refers to shaping, but if you declare a variable int A, you can say that a is an int, but cannot say that int is only a, relative, A is a memory, and int is only a concept of abstract data, is not occupying storage space. Just like classes and objects, such as having a class that is student, then declaring a class object B, or Student B, then B is a concrete instance of the student class.
C + + Learning notes (2)