Click here to Skip to main content
15,907,000 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHELP:using windows common font dialog box Pin
vineet_bhargava5-Oct-04 22:43
vineet_bhargava5-Oct-04 22:43 
GeneralEncryption/Decryption Routines AES Pin
Paolo Ponzano5-Oct-04 22:09
Paolo Ponzano5-Oct-04 22:09 
GeneralCEdit & Enter Key Pin
AbinThomas5-Oct-04 21:32
AbinThomas5-Oct-04 21:32 
GeneralRe: CEdit & Enter Key Pin
Sujan Christo6-Oct-04 0:51
Sujan Christo6-Oct-04 0:51 
GeneralApplication slows down after running for hours Pin
Indrawati5-Oct-04 21:17
Indrawati5-Oct-04 21:17 
GeneralRe: Application slows down after running for hours Pin
Joaquín M López Muñoz5-Oct-04 21:22
Joaquín M López Muñoz5-Oct-04 21:22 
GeneralRe: Application slows down after running for hours Pin
2249175-Oct-04 21:22
2249175-Oct-04 21:22 
QuestionWhy would int be able to exceed its capacity? Pin
Link26005-Oct-04 20:09
Link26005-Oct-04 20:09 
Shouldn't an int only be able to hold 32767 positive integer?
All of the integers a, b and c exceed the limit, and it runs.
The c shows a value of 552222, which is correct.

Could anyone tell me why can it exceed its limit? Thanks.

<br />
        int a = 330000;<br />
	int b = 222222;<br />
	int c = a + b;<br />
<br />
	printf("%d\n", c);<br />
<br />


-----------------------------
C++ without virtual functions is not OO. Programming with classes but without dynamic binding is called "object based", but not "object oriented".
AnswerRe: Why would int be able to exceed its capacity? Pin
PJ Arends5-Oct-04 20:28
professionalPJ Arends5-Oct-04 20:28 
AnswerRe: Why would int be able to exceed its capacity? Pin
Michael Dunn5-Oct-04 20:31
sitebuilderMichael Dunn5-Oct-04 20:31 
GeneralRe: Why would int be able to exceed its capacity? Pin
Link26005-Oct-04 21:28
Link26005-Oct-04 21:28 
GeneralRe: Why would int be able to exceed its capacity? Pin
jan larsen5-Oct-04 22:50
jan larsen5-Oct-04 22:50 
GeneralRe: Why would int be able to exceed its capacity? Pin
toxcct5-Oct-04 23:06
toxcct5-Oct-04 23:06 
GeneralRe: Why would int be able to exceed its capacity? Pin
jan larsen6-Oct-04 1:05
jan larsen6-Oct-04 1:05 
GeneralRe: Why would int be able to exceed its capacity? Pin
Arsalan Malik6-Oct-04 1:46
Arsalan Malik6-Oct-04 1:46 
GeneralRe: Why would int be able to exceed its capacity? Pin
markkuk6-Oct-04 1:54
markkuk6-Oct-04 1:54 
GeneralRe: Why would int be able to exceed its capacity? Pin
toxcct6-Oct-04 2:07
toxcct6-Oct-04 2:07 
GeneralRe: Why would int be able to exceed its capacity? Pin
Arsalan Malik6-Oct-04 2:21
Arsalan Malik6-Oct-04 2:21 
GeneralRe: Why would int be able to exceed its capacity? Pin
toxcct6-Oct-04 6:22
toxcct6-Oct-04 6:22 
GeneralRe: Why would int be able to exceed its capacity? Pin
unimatrics10-Oct-04 0:59
unimatrics10-Oct-04 0:59 
GeneralRe: Why would int be able to exceed its capacity? Pin
jan larsen6-Oct-04 2:13
jan larsen6-Oct-04 2:13 
GeneralRe: Why would int be able to exceed its capacity? Pin
Arsalan Malik6-Oct-04 2:22
Arsalan Malik6-Oct-04 2:22 
GeneralRe: Why would int be able to exceed its capacity? Pin
David Crow6-Oct-04 4:09
David Crow6-Oct-04 4:09 
GeneralProblems with .net Pin
Yulianto.5-Oct-04 19:28
Yulianto.5-Oct-04 19:28 
GeneralRe: Problems with .net Pin
2249175-Oct-04 20:19
2249175-Oct-04 20:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.