I declare an integer and input value from user when i check this program i give the value 40,000 its a overflow but program generate no any type of error why?
Usama_9 0 Newbie Poster
Recommended Answers
Jump to PostIt would be a lot easier to answer that if you posted the code.
Jump to PostThe C++11 Standard says that signed integer overflow/underflow behaviour is "undefined", so any compiler can legally do whatever it wants, including ignore it. Ignoring it (on normal computers) is a lot easier and faster that detecting it and doing something sensible. That's C++ for you.
8.4: If during the …
All 5 Replies
Reverend Jim 4,780 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Usama_9 0 Newbie Poster
Usama_9 0 Newbie Poster
Reverend Jim 4,780 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
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.