Click here to Skip to main content
15,890,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat is MAX_INT for? Pin
Mohamed_Khalil21-Mar-10 7:31
Mohamed_Khalil21-Mar-10 7:31 
AnswerRe: What is MAX_INT (INT_MAX) for? Pin
Joe Woodbury21-Mar-10 7:41
professionalJoe Woodbury21-Mar-10 7:41 
AnswerRe: What is MAX_INT for? Pin
Garth J Lancaster21-Mar-10 11:27
professionalGarth J Lancaster21-Mar-10 11:27 
AnswerRe: What is MAX_INT for? Pin
Adam Roderick J21-Mar-10 18:57
Adam Roderick J21-Mar-10 18:57 
GeneralRe: What is MAX_INT for? Pin
Vaclav_22-Mar-10 3:48
Vaclav_22-Mar-10 3:48 
GeneralRe: What is MAX_INT for? Pin
Joe Woodbury22-Mar-10 6:30
professionalJoe Woodbury22-Mar-10 6:30 
GeneralRe: What is MAX_INT for? Pin
Adam Roderick J22-Mar-10 7:08
Adam Roderick J22-Mar-10 7:08 
GeneralRe: What is MAX_INT for? Pin
Joe Woodbury22-Mar-10 7:16
professionalJoe Woodbury22-Mar-10 7:16 
It's entirely dependent on the compiler, which is why I corrected Vaclav_Sal.

The only requirement is that the size of an int is as big or bigger than that of a short and as big or smaller than that of a long. A compliant compiler could make a char, short, int and long all 5 bits long if it chose. Likewise, it could make them all 64-bits long regardless of the underlying CPU and/or system architecture.

However, Vaclav_Sal is correct if he's suggesting that in the past, an int generally reflected the optimal "WORD" size of a CPU--a point I made earlier. However, for 64-bit and greater processors, int has lost that meaning and is generally 32-bits long.
GeneralRe: What is MAX_INT for? Pin
Adam Roderick J23-Mar-10 5:38
Adam Roderick J23-Mar-10 5:38 
QuestionOwner drawn ListBox problem Pin
Manmohan2921-Mar-10 5:25
Manmohan2921-Mar-10 5:25 
AnswerRe: Owner drawn ListBox problem Pin
«_Superman_»21-Mar-10 6:40
professional«_Superman_»21-Mar-10 6:40 
GeneralRe: Owner drawn ListBox problem Pin
Manmohan2921-Mar-10 7:04
Manmohan2921-Mar-10 7:04 
GeneralRe: Owner drawn ListBox problem Pin
«_Superman_»21-Mar-10 7:10
professional«_Superman_»21-Mar-10 7:10 
GeneralRe: Owner drawn ListBox problem Pin
Manmohan2921-Mar-10 7:27
Manmohan2921-Mar-10 7:27 
GeneralRe: Owner drawn ListBox problem Pin
Manmohan2921-Mar-10 8:06
Manmohan2921-Mar-10 8:06 
AnswerRe: Owner drawn ListBox problem Pin
Luc Pattyn21-Mar-10 11:18
sitebuilderLuc Pattyn21-Mar-10 11:18 
QuestionOpenGL Pin
MrMcIntyre21-Mar-10 4:45
MrMcIntyre21-Mar-10 4:45 
AnswerRe: OpenGL Pin
Richard MacCutchan21-Mar-10 6:09
mveRichard MacCutchan21-Mar-10 6:09 
QuestionGetAsyncKeyState() and GetKeyState() [Solved] Pin
Rozis21-Mar-10 2:05
Rozis21-Mar-10 2:05 
AnswerRe: GetAsyncKeyState() and GetKeyState() Pin
CPallini21-Mar-10 2:48
mveCPallini21-Mar-10 2:48 
GeneralRe: GetAsyncKeyState() and GetKeyState() Pin
Rozis21-Mar-10 3:12
Rozis21-Mar-10 3:12 
GeneralRe: GetAsyncKeyState() and GetKeyState() Pin
CPallini21-Mar-10 3:23
mveCPallini21-Mar-10 3:23 
GeneralRe: GetAsyncKeyState() and GetKeyState() Gathered answers [modified] Pin
Rozis21-Mar-10 4:23
Rozis21-Mar-10 4:23 
AnswerRe: GetAsyncKeyState() and GetKeyState() Pin
Adam Roderick J21-Mar-10 4:53
Adam Roderick J21-Mar-10 4:53 
GeneralRe: GetAsyncKeyState() and GetKeyState() Pin
Rozis21-Mar-10 5:08
Rozis21-Mar-10 5:08 

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.