Click here to Skip to main content
16,020,315 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Correct "Window Data Types" Pin
Roger Broomfield14-Nov-07 20:21
Roger Broomfield14-Nov-07 20:21 
GeneralRe: Correct "Window Data Types" Pin
CodingLover14-Nov-07 21:45
CodingLover14-Nov-07 21:45 
GeneralRe: Correct "Window Data Types" Pin
Nelek14-Nov-07 22:20
protectorNelek14-Nov-07 22:20 
GeneralRe: Correct "Window Data Types" Pin
CodingLover14-Nov-07 22:54
CodingLover14-Nov-07 22:54 
GeneralRe: Correct "Window Data Types" Pin
Nelek15-Nov-07 0:18
protectorNelek15-Nov-07 0:18 
GeneralRe: Correct "Window Data Types" Pin
CodingLover15-Nov-07 0:43
CodingLover15-Nov-07 0:43 
GeneralRe: Correct "Window Data Types" Pin
Nelek15-Nov-07 23:59
protectorNelek15-Nov-07 23:59 
AnswerRe: Correct "Window Data Types" Pin
BadKarma14-Nov-07 22:40
BadKarma14-Nov-07 22:40 
There is no such thing as Windows Data Types.

There are only the c++ data types (when working in c++ Poke tongue | ;-P ) which are
char, short, int, long, long long. All of them can be signed, unsigned or undefined (which means signed).
char = 1 byte ( 8 bit)
short = 2 byte (16 bit)
long = 4 byte (32 bit)
long long = 8 byte (64 bit)
int = natural size of adressing on 32 bit platforms this will be 4 byte. on other platforms this could be smaller or larger. Alsoo this size can change from compiler to compiler. Apperantly MS has defined that a int will always be 32 bit.

From basetsd.h
//
// The following types are guaranteed to be unsigned and 32 bits wide.
//

typedef unsigned int ULONG32, *PULONG32;
typedef unsigned int DWORD32, *PDWORD32;


When using struct especialy use known size type, which means never use int! That way this piece of code can work cross-platform, cross-compiler.


codito ergo sum

GeneralRe: Correct "Window Data Types" Pin
CodingLover14-Nov-07 22:51
CodingLover14-Nov-07 22:51 
GeneralRe: Correct "Window Data Types" Pin
BadKarma14-Nov-07 23:35
BadKarma14-Nov-07 23:35 
GeneralRe: Correct "Window Data Types" Pin
jhwurmbach14-Nov-07 23:35
jhwurmbach14-Nov-07 23:35 
GeneralRe: Correct "Window Data Types" Pin
Iain Clarke, Warrior Programmer14-Nov-07 23:46
Iain Clarke, Warrior Programmer14-Nov-07 23:46 
GeneralRe: Correct "Window Data Types" Pin
CodingLover15-Nov-07 0:19
CodingLover15-Nov-07 0:19 
QuestionUnable to use microsoft Chart Control Version Pin
Kumar Anshu14-Nov-07 18:50
Kumar Anshu14-Nov-07 18:50 
AnswerRe: Unable to use microsoft Chart Control Version Pin
Nelek14-Nov-07 20:24
protectorNelek14-Nov-07 20:24 
GeneralRe: Unable to use microsoft Chart Control Version Pin
Kumar Anshu15-Nov-07 4:05
Kumar Anshu15-Nov-07 4:05 
GeneralRe: Unable to use microsoft Chart Control Version Pin
Nelek15-Nov-07 20:46
protectorNelek15-Nov-07 20:46 
GeneralRe: Unable to use microsoft Chart Control Version Pin
Kumar Anshu20-Nov-07 3:58
Kumar Anshu20-Nov-07 3:58 
AnswerRe: Unable to use microsoft Chart Control Version Pin
krmed15-Nov-07 1:47
krmed15-Nov-07 1:47 
GeneralRe: Unable to use microsoft Chart Control Version Pin
Kumar Anshu20-Nov-07 4:03
Kumar Anshu20-Nov-07 4:03 
Questionneed help with c programming datetime variable Pin
neodeaths14-Nov-07 18:24
neodeaths14-Nov-07 18:24 
AnswerRe: need help with c programming datetime variable Pin
Kumar Anshu14-Nov-07 18:58
Kumar Anshu14-Nov-07 18:58 
GeneralRe: need help with c programming datetime variable Pin
neodeaths14-Nov-07 19:09
neodeaths14-Nov-07 19:09 
AnswerRe: need help with c programming datetime variable Pin
Roger Broomfield14-Nov-07 19:03
Roger Broomfield14-Nov-07 19:03 
Questionproblem with std::wofstream [modified] Pin
Saurabh.Garg14-Nov-07 18:20
Saurabh.Garg14-Nov-07 18:20 

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.