char not equalt to !=

Non-platform specific questions.

char not equalt to !=

Postby jazz_e_bob » Sun Oct 12, 2003 10:18 am

Is this the correct syntax? :oops:

if (collide.name != "sheild")
{
/* collide routine here */
}
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby makslane » Sun Oct 12, 2003 5:48 pm

Use the C string manipulation:


Code: Select all
if (strcmp(collide.name, "sheild") != 0)
{
/* collide routine here */
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby jazz_e_bob » Sun Oct 12, 2003 7:39 pm

Thanks again Makslane. :)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron