+ 1
How to split strings?
example- string x="hello world"; I want to get the two words from the string separately so i can modify them then at the end of it all I want to place the modified words back into the string..How can i do that???
3 Respostas
+ 9
You can use strtok() like Jay Matthews said in C/C++ both. If you are using this function in C++ then you need to convert your string(string data type) to C-Style string(char array) using c_str() function.
+ 2
No, dont worry
+ 1
If i were to modify the part that i split in the string,would the original string value change too.