QString line = "";
std::vector<std::pair<int, QString> >::iterator it = recordingArray.begin();
while(it != recordingArray.end())
{
line.append(*it);
line.append(',');
}
The above loops out a vector. I need to convert each part of the pair to a string and then add it into “line”.
How can I do this?
I would use a
std::stringstream, then convert that to aQStringEDIT: I’m not sure QString overloads
operator<<(std::ostream &out, const QString &qs), so an extra conversion tostd::stringseems necessary.