c++实用函数

1.输入输出

读入数字

int a;/std::string a;
std::cin>>a;//将键入数字/字符串为变量a赋值

读入一行字符

#include<string>
getline(std::cin,theName)//将键盘键入字符串读入theName,字符串中可以存在空格 如Jane Grace

猜你喜欢

转载自blog.csdn.net/weixin_41978333/article/details/81173834