C++ 行参数的大小

C++ 行参数的大小,c++,visual-studio,visual-c++,visual-c++-2010,C++,Visual Studio,Visual C++,Visual C++ 2010,是否有任何参数可以从输入中读取整行数据?我知道有getline(buffer,size,of the,of,of,the,of,of,of,the,of,of,of,the,of,of,the,of,of,the,of,of,the,of,of,the,of,the,of,the,of,the,the,of,the,the,of,the,the,the,the,the,the,the,the,the,the,the。有这样的事吗 提前谢谢 是,使用,它将把整行读入std::string: std

是否有任何参数可以从输入中读取整行数据?我知道有getline(buffer,size,of the,of,of,the,of,of,of,the,of,of,of,the,of,of,the,of,of,the,of,of,the,of,of,the,of,the,of,the,of,the,the,of,the,the,of,the,the,the,the,the,the,the,the,the,the,the。有这样的事吗

提前谢谢

是,使用,它将把整行读入
std::string

std::string line;
std::getline(std::cin, line);
是,使用,它将把整行读入
std::string

std::string line;
std::getline(std::cin, line);

是,在
标题中定义的自由函数:

#包括
#包括
int main()
{
std::输入的字符串行;
std::getline(std::cin,输入的第_行);//仅受字符串的最大大小限制
}

是,在
标题中定义的自由函数:

#包括
#包括
int main()
{
std::输入的字符串行;
std::getline(std::cin,输入的第_行);//仅受字符串的最大大小限制
}

不错!作为第一个回答的人,我将给出这个被接受的答案的状态。老实说,我不是第一个:)很好!作为第一个回答的人,我将给出这个被接受的答案的状态。老实说,我不是第一个:)很好!这正是我想要的。:)美好的这正是我想要的。:)