How is it possible that my program asked to cout a bool variable writes 104 on the display? Even if the variable wasn't initialized, it should display 0 or 1 I thought? Another thing is that it seems to be initialized and to go wild at one moment.
mmasny
0
Light Poster
Recommended Answers
Jump to PostIt's because there is a mistake in the program.
Jump to PostHow is it possible that my program asked to cout a bool variable writes 104 on the display? Even if the variable wasn't initialized, it should display 0 or 1 I thought?
Well, you thought wrong there. Don't assume anything about uninitialized variables and their possible values at any given …
Jump to PostWe're not physics. Post your code!
Its probably something wrong with your program. Maybe the "1" in "104"
is your boolean variable and the 04 is something else.
Jump to PostOK, then try to figure out how to pass the switches to the compiler. I don't have Dev-C++, but generally these options are found via something like;
Project / Settings / Compiler / Compiler Options. Can you find anything similar in Dev-C++?Here is a link to the GCC …
All 14 Replies
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
mitrmkar
1,056
Posting Virtuoso
mmasny
0
Light Poster
mitrmkar
1,056
Posting Virtuoso
mmasny
0
Light Poster
mrnutty
761
Senior Poster
WaltP
commented:
It's not "physics", it's "psychics" :o)
+9
mitrmkar
1,056
Posting Virtuoso
mmasny
0
Light Poster
mitrmkar
1,056
Posting Virtuoso
mmasny
0
Light Poster
mmasny
0
Light Poster
mitrmkar
1,056
Posting Virtuoso
mmasny
0
Light Poster
mitrmkar
1,056
Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.