Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
As Iam new to vc++,
can any one help me what is
#define XYZ ((DWORD)0x000000FAL) ?
Thanks.
Posted

1 solution

#define is a pre-compilation instruction which defines a symbol to be a specific value. It's similar to a variable declaration but you can't change it. (There is more to it than that, see #define[^] for a lot more details)

XYZ is the symbol that you are defining - the variable name if you want.

((DWORD)0x000000FAL) is the value that you are defining XYZ to be, in this case a DWORD constant value that fits in a LONG and has teh hexadecimal value FA

Each time the compiler sees XYZ it will replace it with ((DWORD)0x000000FAL)
 
Share this answer
 
Comments
Richard MacCutchan 19-Jul-12 11:59am    
Definitely not the hexadecimal value sweet FA. 8)
OriginalGriff 19-Jul-12 12:05pm    
I used to work in Alton where sweet Fanny Adams was murdered - http://en.wikipedia.org/wiki/Fanny_Adams - and used to eat in the Leathern Bottle when it was a very good Italian restaurant.
Richard MacCutchan 19-Jul-12 12:11pm    
My only knowledge of Alton was watching amateur cycle racing in the town when my son was into racing. I was not aware that was where Fanny was done in - more information to clutter my overloaded brain.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900