Skip to content

Instantly share code, notes, and snippets.

@DForshner
Created June 29, 2013 17:36
Show Gist options
  • Save DForshner/5891988 to your computer and use it in GitHub Desktop.
Save DForshner/5891988 to your computer and use it in GitHub Desktop.
// Init vector of ints
static const int values[] = {6,2,7,9,5,8,1,4,3,0};
vector<int> v (values, values + sizeof(values) / sizeof(values[0]) );
// Convert to string
std::stringstream ss;
for (int n : v)
ss << n;
string str = ss.str();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment