Integer data type

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Dec 2004
Posts: 4
Reputation: fero45 is an unknown quantity at this point 
Solved Threads: 0
fero45 fero45 is offline Offline
Newbie Poster

Integer data type

 
0
  #1
Dec 9th, 2004
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,070
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 938
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Integer data type

 
0
  #2
Dec 9th, 2004
In the 32 bit world integers have a range of:

-2,147,483,648 to 2,147,483,647
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4
Reputation: fero45 is an unknown quantity at this point 
Solved Threads: 0
fero45 fero45 is offline Offline
Newbie Poster

Re: Integer data type

 
0
  #3
Dec 9th, 2004
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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC