Created
March 19, 2012 19:24
-
-
Save timpulver/2125156 to your computer and use it in GitHub Desktop.
String in char* konvertieren (CPP)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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