0

hey guys,
i need help with understandind this code-actually just some parts of it. can you explain to me what the purpose of this is:
*(float*) variable = 34;
i can understand the variable = 34 part just not the *(float*) part. what does it do?
also what is the function of this: (DWORD*)
in this code
#define variable 0x00CB11C8
(some variable/pointer) = (DWORD*)variable

i think this code is from MFC (microsoft foundation class)
any help is appreciated

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by nezachem
0

>>*(float*) variable = 34;

It is typcasting variable into a float *, then assigning the value 34 to it.

DWORD* is doing something similar to above. DWORD is defined by Microsoft's windows.h to be unsigned long;. So its the same as (unsigned long *)

I've studied MFC a lot and have never seen this: If it exists, please tell us where you found that. Maybe some very very old 16-bit code?

#define variable 0x00CB11C8
(some variable/pointer) = (DWORD*)variable

Edited by Ancient Dragon: n/a

0

>>*(float*) variable = 34;

It is typcasting variable into a float *, then assigning the value 34 to it.

Correction: through it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.