String Comparison
Displaying 1-3 of 3 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
TheGerf

Is it possible to compare a string in an if statement.
eg
if(answer == "Blah")
or something of the like.
If possible, would I use ''s ""s or something else?



TheGerf, not just any gerf.

Posted on 2001-01-06 01:47:15

andy

if (!strcmp(stringa,stringb))
{
 // this will execute if stringa is equal to stringb
}

if (strcmp(stringa,stringb))
{
 // this will execute if stringa is not equal to stringb
}



'Never confuse a single defeat with a final defeat.' -F. Scott Fitzgerald

Posted on 2001-01-06 02:34:47

TheGerf

.



TheGerf, not just any gerf.

Posted on 2001-01-06 15:24:14


Displaying 1-3 of 3 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.