Sign in to follow this  
AntiGuy

char Check

Recommended Posts

Is there an easy way to check what a string says? For example: if(Text == "Bill got hit by a truck"){KillBill();} It seemed like it work compile on its own. [Edited by - AntiGuy on May 29, 2005 6:12:44 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Oberon_Command
Nope, can't see the difference that fast. It's not a chatroom...


Look at the time stamp, it uses seconds.

Share this post


Link to post
Share on other sites
Quote:
Original post by AntiGuy
It seemed like it work compile on its own.


The reason it compiles is because "Bill got hit by a truck" has an actual address in the data segment of your program. What you have will compare this value with the value of Text (the number of the memory location it points to). This is certainly not what you want though...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this