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

C / C++ / MFC

 
GeneralRe: How can I get a HBITMAP handle from a CImageList Object? Pin
mathievp24-Mar-09 8:37
mathievp24-Mar-09 8:37 
QuestionSid in report event function Pin
ashokvishnu25-Aug-06 0:54
ashokvishnu25-Aug-06 0:54 
QuestionC function for parsing string array? Pin
9ine25-Aug-06 0:38
9ine25-Aug-06 0:38 
AnswerRe: C function for parsing string array? Pin
Anonymuos25-Aug-06 0:52
Anonymuos25-Aug-06 0:52 
AnswerRe: C function for parsing string array? Pin
toxcct25-Aug-06 3:01
toxcct25-Aug-06 3:01 
GeneralRe: C function for parsing string array? Pin
Anonymuos25-Aug-06 6:03
Anonymuos25-Aug-06 6:03 
AnswerRe: C function for parsing string array? Pin
Zac Howland25-Aug-06 6:41
Zac Howland25-Aug-06 6:41 
AnswerRe: C function for parsing string array? [modified] Pin
Stephen Hewitt26-Aug-06 3:18
Stephen Hewitt26-Aug-06 3:18 
If you're using C++ (and probably even if you're using C) using strtok is bad form. It modifies the input string and isn't thread safe for a start. Avoid it like the plague. Here's how I'd do it in C++:

#include <iostream>
#include <string>
#include <sstream>

int main(int argc, char* argv[])
{
    using namespace std;
 
    const char message[] = "Line 1\nLine 2\nThe third and last line\n";
 
    istringstream iss(message);
    string line;
    while (getline(iss, line))
    {
       cout << line << endl;
    }
 
    return 0;
}



Steve

Questionbasic question in C++ Pin
Green Fuze25-Aug-06 0:37
Green Fuze25-Aug-06 0:37 
AnswerRe: basic question in C++ Pin
prasad_som25-Aug-06 1:54
prasad_som25-Aug-06 1:54 
GeneralRe: basic question in C++ Pin
Green Fuze25-Aug-06 2:10
Green Fuze25-Aug-06 2:10 
GeneralRe: basic question in C++ Pin
Kevin McFarlane27-Aug-06 8:32
Kevin McFarlane27-Aug-06 8:32 
AnswerRe: basic question in C++ Pin
Nish Nishant26-Aug-06 3:28
sitebuilderNish Nishant26-Aug-06 3:28 
QuestionProgress bar problem. Pin
Deepak Samuel24-Aug-06 23:51
Deepak Samuel24-Aug-06 23:51 
QuestionRe: Progress bar problem. Pin
Programm3r25-Aug-06 0:00
Programm3r25-Aug-06 0:00 
AnswerRe: Progress bar problem. Pin
Programm3r25-Aug-06 0:08
Programm3r25-Aug-06 0:08 
AnswerRe: Progress bar problem. Pin
Hamid_RT25-Aug-06 0:43
Hamid_RT25-Aug-06 0:43 
QuestionRe: Progress bar problem. Pin
David Crow25-Aug-06 2:40
David Crow25-Aug-06 2:40 
QuestionSuperscript and Subscript Calculation Pin
Identity Undisclosed24-Aug-06 23:12
Identity Undisclosed24-Aug-06 23:12 
Questionrefresh the device node for Deivce Manager Pin
jiajiah344524-Aug-06 22:42
jiajiah344524-Aug-06 22:42 
QuestionEthernet Programming Pin
Muhammad Azeem Azam24-Aug-06 22:36
Muhammad Azeem Azam24-Aug-06 22:36 
QuestionLength of SQL-query Pin
ensger24-Aug-06 22:27
ensger24-Aug-06 22:27 
AnswerRe: Length of SQL-query Pin
toxcct24-Aug-06 22:33
toxcct24-Aug-06 22:33 
GeneralRe: Length of SQL-query Pin
ensger25-Aug-06 0:29
ensger25-Aug-06 0:29 
QuestionBlogging with VC++ Pin
_AnsHUMAN_ 24-Aug-06 21:53
_AnsHUMAN_ 24-Aug-06 21: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.