我之前声明了一个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错误?