Mad son C + + notes
1.c++ input, output, header file interpretation
#include <iostream>
using namespace Std;
int Mian ()
{
cout << "Thie is a C + + program";
return 0;
}
Program Run Result: Thie is a C + + programs
(1) The function of "<<" is to insert the contents of the quotation marks into the output queue cout (the output queue is also referred to as the "output stream") equivalent to printf in the C language.
(2) Standard C + + stipulates that the main function must be declared int.
(3) The normal execution of the program, the first system returns the value 0;
(4) The role of file iostream is to provide the program with some information needed to input and output.
(5) ">>" input stream object. such as (int A, a, cin >> a >> b; the first input is assigned to a, the second input is assigned to B)
(6) cout << "A + b =" << sum << Endl; ("Endl: newline, and end line abbreviation")
(7)
#include <iostream>
using namespace Std;
Equivalent to
#include <iostream.h>
2. Class
Mad son C + + notes,