Skip to content

Instantly share code, notes, and snippets.

@pkivolowitz
Created April 13, 2017 12:04
Show Gist options
  • Save pkivolowitz/e038e1e9f5ce526189034929394b48a4 to your computer and use it in GitHub Desktop.
Save pkivolowitz/e038e1e9f5ce526189034929394b48a4 to your computer and use it in GitHub Desktop.
Example of using a repeated map in proto3 - you're welcome
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"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment