Re: String Comparision



Old Wolf wrote, On 29/04/07 23:40:
On Apr 30, 5:46 am, Flash Gordon <s...@xxxxxxxxxxxxxxxxxx> wrote:
Then your description of the problem is inaccurate, the code does not
modify the strings. I suggest you examine the improvements and comments
by myself and the others and see if it then works.

He never said it did. He said that "s" and "t" were modified.
Those are pointers to char, which he increments in each
loop iteration.

I can't remember exactly what he said, but my mental filters would probably have assumed that as he was explicitly modifying those variables he would not be surprised by them changing value. Of course, I could be wrong.
--
Flash Gordon
.



Relevant Pages

  • Re: Processing command line arguments
    ... original code) be a reasonable solution?: ... However this is the way round.argvcontains a list of strings. ... strings in place, though I think they are writeable for historical reasons, ... and it is a bad idea and may even be illegal to modify the pointers in theargvarray. ...
    (comp.lang.c)
  • Re: The Coalition against Personal Firewalls
    ... correct changes. ... You can modify the code as YOU like. ... It seems you don't know that modern compilers do a lot of optimization ... or strings. ...
    (comp.security.firewalls)
  • Re: Where can I change international system popup message contents?
    ... one can just modify the variable of IDS_CONFIRM_DEL_RECBIN from ... But it is only applicable to english os. ... like you would find the LOC_* strings in common.str. ... IDS_CONFIRM_DEL_RECBIN is local to the ceshui component. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Useless obfucation in synopsis for fopen
    ... This expresses very clearly that fopen is not allowed to modify ... strings, behaviour is undefined. ... When fopen figures out that there is no file named "nonexisting file" ... and tries to set errno, the result is undefined behaviour and your ...
    (comp.std.c)
  • Re: List mapping question
    ... Marc Huffnagle wrote: ... > I have a number of variables that I want to modify (a bunch of strings ... > that I need to convert into ints). ...
    (comp.lang.python)