我正在尝试将存储在vector
中的值复制为空QStringList
(如下面的代码所示):
QStringList acceptedIPListFromFile()
{
..............
// Read the file until the end
while(!inFile.eof())
{
getline (inFile,line);
string token;
stringstream stream(line);
vector<string> vect;
while(getline(stream, token, delim) )
{
vect.push_back(token);
}
d.Name = vect[0];
d.IP = vect[1];
d.Port = vect[2];
AllData.push_back(d);
accepted_ip_list.append(d.IP);
count++;
vect.clear();
}
.....................
}
但是我在编译时收到错误:
no matching function for call to 'QStringList::append(std::__cxx11::string&)'