Re: String Comparision



Richard Heathfield wrote:

Fred Kleinschmidt said:


"Default User" <defaultuserbr@xxxxxxxxx> wrote in message
news:59kkpuF2k1o49U1@xxxxxxxxxxxxxxxxxxxxx
user34 wrote:


I did not retype the code !
Here it is once again (without any of the above suggested
improvements)and it still shows me the same error!

#include<stdio.h>

int comp(char *s,char *t)
{
for(;*s==*t;s++,t++);
^
That semicolon doesn't belong.


What semicolon? That is a comma.

From here, it's whitespace. But in Default User's original reply, it
was a 't'.

Methinks Brian composes news articles using a proportional font.

No, I use a non-proportional font. My newsreader uses Courier New. My
reply to my original message did bump it over into whitespace, but that
seems to be an artifact of the quoting mechanism.





Brian

.



Relevant Pages

  • Re: Does it need a ";" at the very after of "if" and "for"
    ... Richard Heathfield wrote: ... int main ... The syntax for 'if' is: ... There is no semicolon after the) but before the statement. ...
    (comp.lang.c)
  • Re: The "spinoza" programming language
    ... int x,y,z; ... "Statements are terminated with a semicolon" ... When a compilation process is more ... Seed7 - The extensible programming language: ...
    (comp.programming)
  • Re: [PATCH 2.6.6-rc3] Lindent on arch/i386/kernel/cpuid.c
    ... I added the semicolon for consistency and that caused Lindent to do ... struct cpuid_command cmd; ... static loff_t cpuid_seek(struct file *file, loff_t offset, int orig) ... loff_t ret; ...
    (Linux-Kernel)
  • Re: String parsing question
    ... Dan Pop wrote: ... >> format, and items in the fourth format to the second. ... >> or may not have a trailing semicolon. ... static int flushrecord ...
    (comp.lang.c)
  • Re: Structure of functions
    ... int main(void) ... My question is if the semicolon is permitted at the end of a function (see ... A lone semicolon is not allowed by the grammar at that point. ...
    (comp.lang.c)