Article View: att.lang.c++
Article #86Re: strtok()
From: Brian
Date: Sun, 07 May 2000 00:00
Date: Sun, 07 May 2000 00:00
26 lines
1503 bytes
1503 bytes
In article <8f547i$apj$1@bob.news.rcn.net>, "Henry Zektser"
<kdentdev@hotmail.com> wrote:
>Hey all, I'm using MSVC++ 6.0 Enterprise and strtok(). The following code
>builds, and executes, but I get no output on cerr, is this a problem with
>strtok? MS's sample code doesnt work either...
> trying to do this:
>char LineContents[]="blah blah blah";
>char seps[]=" \n";
>
> token = strtok(LineContents, seps);
> cerr << "token (bl): " << token << endl;
> while( token != NULL )
> {
> cerr << "token: " << token << endl;
> token = strtok( NULL, seps );
> }
>
>H
Without seeing the whole source file, it is difficult to really assess
where the problem might be. It has been my experience that most
programming books contain LOTS of errors in the sample code. In
addition, Microsoft tends to push products out the door that are
somewhat half-baked. Have you applied the latest & greatest OS service
packs? How about MSVC++ service packs?
Technical Details
Message-ID:
<bfrancis-0F81B5.19253207052000@enews.newsguy.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8f547i$apj$1@bob.news.rcn.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4ba,e2c93d4356ee1452 X-Google-Attributes: gid10d4ba,public X-Google-Thread: 109fba,e2c93d4356ee1452 X-Google-Attributes: gid109fba,public From: Brian <bfrancis@inreach.com> Subject: Re: strtok() Date: 2000/05/07 Message-ID: <bfrancis-0F81B5.19253207052000@enews.newsguy.com> X-Deja-AN: 620506054 References: <8f547i$apj$1@bob.news.rcn.net> Organization: http://extra.newsguy.com User-Agent: MT-NewsWatcher/3.0 (PPC) Newsgroups: att.lang.c++,comp.lang.c++