Skip to content

Instantly share code, notes, and snippets.

@timpulver
Created March 19, 2012 19:24
Show Gist options
  • Save timpulver/2125156 to your computer and use it in GitHub Desktop.
Save timpulver/2125156 to your computer and use it in GitHub Desktop.
String in char* konvertieren (CPP)
// String definieren
string s1("Ein Text");
// Zeichen aus String in char-Feld umkopieren
char charArray[40];
// string.c_str() liefert char*
strcpy(charArray,s1.c_str());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment