string line = ""; auto it = recordingArray.begin(); while(it != recordingArray.end()) { line.append(*it); line.append(','); }
This assumes that each element is directly converted to a string. You may need to write a toString function.
string toString(std::pair<int, QString>> input) { }
Then call line.append(toString(*it)) .
source share