rgb192
asked on
how to use datatypes: word and dword in c
#include<stdio.h>
#include<string.h>
which include library do I need to have word and dword.
#include<string.h>
which include library do I need to have word and dword.
Neither one. 'word' and 'dword' are part of the language.
You might find some appropriate types to use in
<stdint.h>
<stdint.h>
Did you mean DWORD and WORD rather than dword and word?
In any case, none of these four tokens are part of the ANSI C language. DWORD and WORD are created by Microsoft so that if you use them, you will have more trouble porting to other systems, and be stuck using Microsoft. Do avoid them if you do not need them.
From http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx
In any case, none of these four tokens are part of the ANSI C language. DWORD and WORD are created by Microsoft so that if you use them, you will have more trouble porting to other systems, and be stuck using Microsoft. Do avoid them if you do not need them.
From http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx
DWORDThe size of long is implementation dependent. Maybe Microsoft constrains long to be 32-bits.
A 32-bit unsigned integer. The range is 0 through 4294967295 decimal.
This type is declared in IntSafe.h as follows:
typedef unsigned long DWORD;
WORD
A 16-bit unsigned integer. The range is 0 through 65535 decimal.
This type is declared in WinDef.h as follows:
typedef unsigned short WORD;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I type
dword
no intellisense until I add
<minwindef.h> to the top of file
thanks
dword
no intellisense until I add
<minwindef.h> to the top of file
thanks
typedef theTypeYouWantToUseForDwor