help please..

Posted by: Agent_E

help please.. - 09/27/03 04:22 PM

help !
im getting a parse error at the 11 line before the ] token (using dev-cpp) !
I was trying playing with the code but nothing worked !
please help me ! explain how to use strcmp once and for all ! 10x

the code :
http://www.sourcecode.no/pastebin/en/index.php?page=show&id=2778&key=y9g4xqnp0
Posted by: SilentRage

Re: help please.. - 09/28/03 02:51 AM

Change the following line:

if(strcmp (r[35],b[]!=0))

To

if(strcmp(r, b) != 0)
Posted by: Digital Geek

Re: help please.. - 09/28/03 05:21 AM

strcmp performs a case-sensitive comparison of the two argument strings. strcmp(arg1,arg2) returns a number.

There are three cases :

1. If is lexicographically less than, the `strcmp()' returns a negative number.
2. If the two strings are identical, `strcmp()' returns zero.
3. Otherwise, `strcmp()' returns a positive number.

So in your case, like SilentRage said, you have to test if strcmp(r,b) !=0

Peace !