cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
If statement not working right
If statement not working right
Jun 2, 2015 at 6:11pm UTC
StrikeChaos1
(3)
Ok, I have a weird bug. For one of the If statements,it will still go through even if it shouldn't.
if(var == 0) [var = 0] OKAY!
if(var == 0) [var = 2] ...wtf?
Also on a curious note, on my ultimate visual studio 2010, I can't put a breakpoint on that If statement. It puts a breakpoint to the next place you can put one?
Any advice?
Jun 2, 2015 at 6:16pm UTC
shadowmouse
(539)
Firstly, you're missing a semicolon on both. The first if does nothing anyway. You should be using curly braces not square brackets.
Topic archived. No new replies allowed.