Re: strtok
- From: "Jacky Luk" <jl@xxxxxxxxxx>
- Date: Fri, 1 Jul 2005 19:08:01 +0800
Not there....
There seems to be a problem on this line (from the debugger)
strcpy (ins, (char *) g_pMappedFileBase);
Where I defined g_pMappedFileBase as PBYTE
Thanks
Jack
"Jochen Kalmbach [MVP]" <nospam-Jochen.Kalmbach@xxxxxxxxx>
???????:%23mS6XsifFHA.1148@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Jacky!
>
> > char *ins;
> > char *linedetails;
>
> Ok, "ins" and "linedetails" are "char*" (_not_ PBYTE!)
>
>> ins = new char[500000];
>
> Ok (you should check for == NULL)
>
>> strcpy (ins, (char *) g_pMappedFileBase);
>
> Ok (hopefully the length is enough...)
>
>> linedetails = strtok ((char *)ins, (const char *)"\n");
>
> Why do you cast? Why not just:
> linedetails = strtok(ins, "\n");
> ???
>
> Was this the problematic line?
> I cant see any problem here (expect for the abouve ones ;-) ).
>
> --
> Greetings
> Jochen
>
> My blog about Win32 and .NET
> http://blog.kalmbachnet.de/
.
- References:
- Re: strtok
- From: Jacky Luk
- Re: strtok
- From: Jochen Kalmbach [MVP]
- Re: strtok
- From: Jacky Luk
- Re: strtok
- From: Jacky Luk
- Re: strtok
- From: Jochen Kalmbach [MVP]
- Re: strtok
- Prev by Date: Re: C2512: no default ctor for non-existing class
- Next by Date: Re: strtok
- Previous by thread: Re: strtok
- Next by thread: Re: strtok
- Index(es):
Relevant Pages
|