使用cin进行标准输入,可以通过cin >> 变量名来读取数据,例如:
int num;cin >> num;使用getline函数进行字符串输入,可以通过getline(cin, 变量名)来读取一行字符串,例如:string str;getline(cin, str);使用cin.getline函数进行带有空格的字符串输入,可以通过cin.getline(字符数组, 数组大小)来读取带有空格的字符串,例如:char str[100];cin.getline(str, 100);使用scanf函数进行输入,可以通过scanf函数来读取数据,例如:int num;scanf("%d", &num);使用stringstream进行数据处理,可以使用stringstream类将输入的字符串转换为其他类型的数据,例如:#include <sstream>string str = "123 456";int num1, num2;stringstream ss(str);ss >> num1 >> num2; 

