Skip to content

Instantly share code, notes, and snippets.

@r2p2
Created August 12, 2012 17:25
Show Gist options
  • Select an option

  • Save r2p2/3333166 to your computer and use it in GitHub Desktop.

Select an option

Save r2p2/3333166 to your computer and use it in GitHub Desktop.
c++11
// so viel code brauchte man bisher
std::vector<std::vector<int> > list;
std::vector<int> sublist1;
sublist1.push_back(1);
sublist1.push_back(2);
sublist1.push_back(3);
std::vector<int> sublist2;
sublist1.push_back(4);
sublist1.push_back(5);
sublist1.push_back(6);
list.push_back(sublist1);
list.push_back(sublist2);
// so viel jetzt:
std::vector<std::vector<int>> list({{1,2,3},{4,5,6}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment