PDA

View Full Version : How to split the char* with the token??



Gokulnathvc
15th April 2011, 11:19
How to split the char* with the token?? in the following code::


token = strtok_s( (char*)strbuff, "_", &nextToken );

mcosta
15th April 2011, 12:13
Use QString::split.



QString mystring (strbuff);
QStringList tokens = mystring.split("_");