Hi, I'm trying to typedef a structure, and a pointer to a structure, but I'm getting compiler errors and I don't understand why. I'm using Visual C++ 6.0. Basically I want LPSTYLESTRUCT to be a pointer to STYLESTRUCT, here is my code:
Code:
typedef struct {
DWORD styleOld;
DWORD styleNew;
} STYLESTRUCT, * LPSTYLESTRUCT;
int main() {
STYLESTRUCT styleStruct;
LPSTYLESTRUCT lpStyleStruct;
lpStyleStruct = &styleStruct;
}
And here are the errors:
Code:
error C2371: 'STYLESTRUCT' : redefinition; different basic types
c:\program files\microsoft platform sdk\include\winuser.h(2773) : see declaration of 'STYLESTRUCT'
error C2371: 'LPSTYLESTRUCT' : redefinition; different basic types
c:\program files\microsoft platform sdk\include\winuser.h(2773) : see declaration of 'LPSTYLESTRUCT'
Thanks.