2. Output and input

1. Use cout for output

	cout << "hello, world";
  • The character string to be output is enclosed in double quotation marks.
  • The "<<" symbol indicates that the sentence will send this string to cout; the symbol indicates the path of information flow.
  • Cout is a predefined object, which inserts strings, numbers, etc. into the output stream. (This reflects the advantages of the object: you don't need to know the internal situation of the object, you only need to know its interface to use it.)
#include <iostream>
using namespace std;
int main()
{
   
    
    
	<

Guess you like

Origin blog.csdn.net/Shao_yihao/article/details/115281825