3
我已经事先声明char c[64];
,我想看看管道输出的第一个字:无法从istringstream(C++)函数getline()
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是否错误?