944,126 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 3444
  • C++ RSS
Dec 9th, 2004
0

Integer data type

Expand Post »
Hi
Integers ahve a range from -32.767 to +32,767. How come I can use the following code:

int a = 1000000;
int b = 5000000;
int c = a + b;
cout << c << endl;

... and it works?
Thanks
Frank
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
fero45 is offline Offline
4 posts
since Dec 2004
Dec 9th, 2004
0

Re: Integer data type

In the 32 bit world integers have a range of:

-2,147,483,648 to 2,147,483,647
Moderator
Reputation Points: 1333
Solved Threads: 1404
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Dec 9th, 2004
0

Re: Integer data type

Quote originally posted by vegaseat ...
In the 32 bit world integers have a range of:

-2,147,483,648 to 2,147,483,647
I see. Thank you.
Frank
Reputation Points: 10
Solved Threads: 0
Newbie Poster
fero45 is offline Offline
4 posts
since Dec 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Merge sort
Next Thread in C++ Forum Timeline: Vectors, Functions, and Sorting... oh my!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC