![]() |
Typecasting
I've got a question about typecasting.
The next two lines of C code, do not give any error: Code:
IMAGE_DOS_HEADER * image_dos_header = (IMAGE_DOS_HEADER *) pMem;Code:
fseek(fHandle, (IMAGE_DOS_HEADER *)pMem->e_lfanew, SEEK_SET);Hmm? I used the exact same cast as in the other line. Somebody got an idea on this one? |
Re: Typecasting
nvmind guys(or girls)
i found it out by myself: Code:
fseek(fHandle, ((IMAGE_DOS_HEADER *)pMem)->e_lfanew, SEEK_SET); |
Re: Typecasting
In the second example, you're not casting pMem, you're casting pMem->e_lfanew.
EDIT: Woops, you found it while I was posting. |
Re: Typecasting
yep, thanks though :)
|
| All times are GMT +5.5. The time now is 07:31. |