Click here to Skip to main content
15,914,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow do l execute a program from within the code? Pin
citress24-Jul-02 10:38
citress24-Jul-02 10:38 
AnswerRe: How do l execute a program from within the code? Pin
Ravi Bhavnani24-Jul-02 10:51
professionalRavi Bhavnani24-Jul-02 10:51 
AnswerRe: How do l execute a program from within the code? Pin
Georg Haan24-Jul-02 10:54
Georg Haan24-Jul-02 10:54 
AnswerRe: How do l execute a program from within the code? Pin
Todd Smith24-Jul-02 14:00
Todd Smith24-Jul-02 14:00 
Generalpuzzling question about pointers - *char Pin
ns24-Jul-02 10:37
ns24-Jul-02 10:37 
GeneralRe: puzzling question about pointers - *char Pin
David Chamberlain24-Jul-02 10:42
David Chamberlain24-Jul-02 10:42 
GeneralThank you.- another related question: Pin
ns24-Jul-02 10:58
ns24-Jul-02 10:58 
GeneralRe: Thank you.- another related question: Pin
David Chamberlain24-Jul-02 11:05
David Chamberlain24-Jul-02 11:05 
My suggestion would be to use the 'strtok' function (string to token) on the original string with the commas. On the first call, you specify the source string and a set of delimiters (a comma, in your case) and the function returns a pointer (I think) to the first sequence of characters up to the specified delimiter. On subsequent calls, the source string is specified as NULL, as the function maintains its own buffer. Each consecutive call will return a pointer (I think) to the next sequence of characters up to the specified delimiter. When strtok returns NULL, there are no more tokens.

Two things:
1) strtok replaces the found delimiter with a NULL, which you don't have to worry at all about.
2) the set of delimiters can be changed on each call, if desired. This is handy for parsing a sequence where things are not always the same.

Dave

"You can say that again." -- Dept. of Redundancy Dept.
GeneralRe: Thank you.- another related question: Pin
ns25-Jul-02 1:19
ns25-Jul-02 1:19 
GeneralRe: puzzling question about pointers - *char Pin
Ravi Bhavnani24-Jul-02 10:49
professionalRavi Bhavnani24-Jul-02 10:49 
GeneralRe: puzzling question about pointers - *char Pin
ns25-Jul-02 1:18
ns25-Jul-02 1:18 
GeneralRe: puzzling question about pointers - *char Pin
Ravi Bhavnani25-Jul-02 2:36
professionalRavi Bhavnani25-Jul-02 2:36 
GeneralNever mind... Pin
Ravi Bhavnani25-Jul-02 2:37
professionalRavi Bhavnani25-Jul-02 2:37 
QuestionCan you create two CDialogBars in a frame window? Pin
JohnnyG24-Jul-02 10:28
JohnnyG24-Jul-02 10:28 
GeneralQuestion Mark Handling in ADO Pin
newlogsign24-Jul-02 9:52
newlogsign24-Jul-02 9:52 
QuestionHow do I prevent my application showing a button on the taskbar? Pin
adara24-Jul-02 8:09
adara24-Jul-02 8:09 
AnswerRe: How do I prevent my application showing a button on the taskbar? Pin
Ravi Bhavnani24-Jul-02 10:54
professionalRavi Bhavnani24-Jul-02 10:54 
AnswerRe: How do I prevent my application showing a button on the taskbar? Pin
J Patel24-Jul-02 10:57
J Patel24-Jul-02 10:57 
AnswerRe: How do I prevent my application showing a button on the taskbar? Pin
Paul M Watt24-Jul-02 20:02
mentorPaul M Watt24-Jul-02 20:02 
Generalmethod executing too many times Pin
mgriffith24-Jul-02 8:08
mgriffith24-Jul-02 8:08 
GeneralFonts Pin
Anonymous24-Jul-02 8:06
Anonymous24-Jul-02 8:06 
Questionerror LNK2001?? Pin
Jh324-Jul-02 7:11
Jh324-Jul-02 7:11 
AnswerRe: error LNK2001?? Pin
Le centriste24-Jul-02 8:03
Le centriste24-Jul-02 8:03 
Generalfind in vector !!! Pin
Hadi Rezaee24-Jul-02 6:31
Hadi Rezaee24-Jul-02 6:31 
GeneralRe: find in vector !!! Pin
Joaquín M López Muñoz24-Jul-02 6:35
Joaquín M López Muñoz24-Jul-02 6:35 

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.