Re: String Comparision



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.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
.



Relevant Pages

  • Re: String Comparision
    ... Fred Kleinschmidt wrote: ... int comp ... That semicolon doesn't belong. ... that you use Outlook Express. ...
    (comp.lang.c)
  • Re: Does it need a ";" at the very after of "if" and "for"
    ... int main ... The syntax for 'if' is: ... There is no semicolon after the) but before the statement. ... rjh at above domain ...
    (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)