Re: why debug step by step, it s ok



On Fri, 03 Jun 2005 17:12:39 +0200, Emmanuel Delahaye wrote:

> baumann@pan wrote on 03/06/05 :
>> #include <stdio.h>
>> #include <string.h>
>>
>> int main() {
>> char *buf="5/90/45";
>
> char buf[]="5/90/45";
>
>> char *token;
>> char *lasts;
>>
>> printf("tokenizing \"%s\" with strtok():\n", buf);
>> if ((token = strtok(buf, "/")) != NULL) {
>> printf("token = \"%s\"\n", token);
>> while ((token = strtok(NULL, "/")) != NULL) {
>> printf("token = \"%s\"\n", token);
>> }
>> }
>> }
>
> strings are not mutable...

Psst: string _literals_ are not mutable.

Robert Gamble
.



Relevant Pages

  • Problems with InvokeMember()
    ... The example from MSDN works fine for strings,but it's not working for ... primitives like 'double' ... Type mtype = m.GetType; ... Prev by Date: ...
    (microsoft.public.dotnet.csharp.general)
  • Re: Interfacing question
    ... include data in a gazillions forms, but fundamentally that are all bits ... a few strings, integers ... etc. that could easily be returned using a function call as var types ... Prev by Date: ...
    (microsoft.public.vb.general.discussion)
  • Re: Printf problem with big numbers....
    ... But I changed my algorithm, and now work directly in base 2, and ... instead of printing the results in base 10 or base 2, ... strings, and not with numbers, so it is ok. ... Prev by Date: ...
    (comp.lang.c)
  • Free Poker chip set on first deposit
    ... The Hasselquist Freeroll List is offering a free poker chip set on ... first deposit (no strings attached). ... Prev by Date: ...
    (rec.gambling.poker)
  • Schiassi: Sinfonia Pastorale
    ... strings. ... I swap ith other scores. ... Moris ... Prev by Date: ...
    (rec.music.classical)