Previous Thread
Next Thread
Print Thread
Rate Thread
#17302 09/27/03 08:22 AM
Joined: Sep 2003
Posts: 1
A
Junior Member
Junior Member
A Offline
Joined: Sep 2003
Posts: 1
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

Sponsored Links
▼ Sponsored Links ▼ ▲ Sponsored Links ▲
#17303 09/27/03 06:51 PM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
Change the following line:

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

To

if(strcmp(r, b) != 0)


Domain Registration, Hosting, Management
http://www.dollardns.net
#17304 09/27/03 09:21 PM
Joined: Sep 2002
Posts: 553
UGN Super Poster
UGN Super Poster
Joined: Sep 2002
Posts: 553
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 ! laugh


Link Copied to Clipboard
Member Spotlight
Gremelin
Gremelin
Portland, OR; USA
Posts: 7,204
Joined: February 2002
Forum Statistics
Forums41
Topics33,839
Posts68,797
Members2,177
Most Online73,244
Nov 9th, 2025
Latest Postings
Top Posters
UGN Security 41,392
Gremelin 7,204
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Likes Received
Ghost 2
Girlie 1
unreal 1
Crime 1
Ice 1
Dartur 1
Powered by UBB.threads™ PHP Forum Software 8.0.0