Click here to Skip to main content
15,887,676 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to resolve this err. Pin
CPallini28-May-08 2:26
mveCPallini28-May-08 2:26 
AnswerRe: How to resolve this err. Pin
SandipG 28-May-08 2:41
SandipG 28-May-08 2:41 
QuestionAbout Strtok Pin
savitri28-May-08 1:32
savitri28-May-08 1:32 
AnswerRe: About Strtok Pin
Nibu babu thomas28-May-08 1:52
Nibu babu thomas28-May-08 1:52 
GeneralRe: About Strtok Pin
Graham Bradshaw28-May-08 13:06
Graham Bradshaw28-May-08 13:06 
GeneralRe: About Strtok Pin
Nibu babu thomas28-May-08 17:01
Nibu babu thomas28-May-08 17:01 
AnswerRe: About Strtok Pin
bob1697228-May-08 2:07
bob1697228-May-08 2:07 
AnswerRe: About Strtok Pin
Jijo.Raj28-May-08 8:55
Jijo.Raj28-May-08 8:55 
You can also use stringstream to parse strings. Since I couldn't find a reference, i wrote a quick sample. Check it below.

#include "string"
#include "vector"
#include "sstream"
...

string sResult(_T("Hello,can,you,split,me?")); // Your result string.
istringstream ResultParser( sResult );  // Input string stream.

string sToken;
vector<string> vResults;

// Tokenize strings.
while ( getline( ResultParser, sToken, ',' ))
{
    // print tokens to console.
    vResults.push_back( sToken );
}</string>


Regards,
Jijo.

_____________________________________________________

http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

QuestionLittle conversion problem Pin
Ritxi28-May-08 1:18
Ritxi28-May-08 1:18 
QuestionRe: Little conversion problem Pin
Nelek28-May-08 1:26
protectorNelek28-May-08 1:26 
AnswerRe: Little conversion problem Pin
Ritxi28-May-08 1:33
Ritxi28-May-08 1:33 
GeneralRe: Little conversion problem Pin
Nibu babu thomas28-May-08 1:34
Nibu babu thomas28-May-08 1:34 
GeneralRe: Little conversion problem Pin
Ritxi28-May-08 3:02
Ritxi28-May-08 3:02 
AnswerRe: Little conversion problem Pin
Cedric Moonen28-May-08 1:36
Cedric Moonen28-May-08 1:36 
GeneralRe: Little conversion problem Pin
Ritxi28-May-08 1:39
Ritxi28-May-08 1:39 
GeneralRe: Little conversion problem Pin
Cedric Moonen28-May-08 1:51
Cedric Moonen28-May-08 1:51 
QuestionRe: Little conversion problem Pin
CPallini28-May-08 2:00
mveCPallini28-May-08 2:00 
AnswerRe: Little conversion problem Pin
Nelek28-May-08 2:44
protectorNelek28-May-08 2:44 
GeneralRe: Little conversion problem Pin
Ritxi28-May-08 2:48
Ritxi28-May-08 2:48 
GeneralRe: Little conversion problem Pin
CPallini28-May-08 2:51
mveCPallini28-May-08 2:51 
AnswerRe: Little conversion problem Pin
Ritxi28-May-08 2:46
Ritxi28-May-08 2:46 
GeneralRe: Little conversion problem Pin
Cedric Moonen28-May-08 2:50
Cedric Moonen28-May-08 2:50 
GeneralRe: Little conversion problem Pin
Ritxi28-May-08 3:01
Ritxi28-May-08 3:01 
JokeRe: Little conversion problem Pin
CPallini28-May-08 3:06
mveCPallini28-May-08 3:06 
GeneralRe: Little conversion problem Pin
CPallini28-May-08 2:53
mveCPallini28-May-08 2:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.