This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Row r = sr.row(i); | |
// r.results_size() tells how many are in map. | |
google::protobuf::Map<string, string> m = r.results(); | |
cout << left << setw(8) << m["id"]; | |
cout << setw(30) << m["artist"]; | |
cout << setw(36) << m["title"]; | |
cout << setw(10) << m["duration"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
google::protobuf::Map<string, string>::iterator it = m.begin(); | |
while (it != m.end()) | |
{ | |
cout << it->first << " " << it->second << endl; | |
it++; | |
} |