Hey guys im new to all this and im writing a script to output what my age is and if i enter it correctly it will spit out a text line saying Great job yada yada yada... Now, on the other hand if i input it incorrectly it should spit out that it is put in incorrectly and that i need to keep trying. (Almost like a password system). But it repeatedly is telling me that im entering it correctly and it closes the program ( i am using "Code:Blocks" ). Well here is my script. Tell me if you see what im doing incorrectly and if you can quickly explain that would be greatly appreciated. Thank you!
You need to use the comparison operator "==".
'=' is the assignment operator, so you're setting a to 16, and then checking if a == true, which in C++ is anything but 0.