Skip to content

Instantly share code, notes, and snippets.

@blippy
Last active October 25, 2016 13:26
Show Gist options
  • Select an option

  • Save blippy/4e69f942880b425b3e1ae6993ee03015 to your computer and use it in GitHub Desktop.

Select an option

Save blippy/4e69f942880b425b3e1ae6993ee03015 to your computer and use it in GitHub Desktop.
Convert a const string to (nonconst) char *
vector<char> v(str.begin(), str.end());
v.push_back(0);
char *str = &v[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment