我正在从字符串中去除双引号,但是我一直在使用以下函数时遇到这个错误。这里的问题是什么?
[错误] c.cpp:在函数
c.cpp:11: 错误:无法将
void readCSVCell(stringstream& lineStream, string& s) {
std::getline(lineStream,s,',');
s.erase(remove( s.begin(), s.end(), '\"' ), s.end());
}
[错误] c.cpp:在函数
void readCSVCell(std::stringstream&, std::string&)
中:
c.cpp:11: 错误:无法将
__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >
转换为const char*
,作为int remove(const char*)
的参数1。
#include <algorithm>
? - Naveen