【发布时间】:2012-01-17 03:19:33
【问题描述】:
我有一个先前声明的char c[64];,我正在尝试查看管道输出的第一个字:
read(pipe_replacement_to_main[READ_END], c, BUF_SIZE);
istringstream response_stream(string(c));
string response_string;
getline(response_stream, response_string, ' ');
gcc 在第四行给了我以下信息:
error: no matching function for call to ‘getline(std::istringstream (&)(std::string), std::string&, char)’
我什至无法弄清楚它是如何尝试调用该函数的。我是否声明了 istringstream 错误?
【问题讨论】:
标签: c++ string iostream stringstream