struct: Illegal use of type as an expression
-
Hi
ich verstehe diesen Fehler überhaupt nicht:
in einer funktion deklariere ich:PMOUSE_INPUT_DATA cur;die struct ist in einem header wie folgt definiert:
typedef struct _MOUSE_INPUT_DATA { // // Unit number. E.g., for \Device\PointerPort0 the unit is '0', // for \Device\PointerPort1 the unit is '1', and so on. // USHORT UnitId; // // Indicator flags. // USHORT Flags; // // The transition state of the mouse buttons. // union { ULONG Buttons; struct { USHORT ButtonFlags; USHORT ButtonData; }; }; // // The raw state of the mouse buttons. // ULONG RawButtons; // // The signed relative or absolute motion in the X direction. // LONG LastX; // // The signed relative or absolute motion in the Y direction. // LONG LastY; // // Device-specific additional information for the event. // ULONG ExtraInformation; } MOUSE_INPUT_DATA, *PMOUSE_INPUT_DATA;in <ntddmou.h> aus dem WinDDK
produziert c2275: Illegal use of type as an expression mit dem microsoft x64 compiler 15.00. Hab ich was grobes übersehen, oder was ist los?
-
*Müll*
-
Machst du zufällig C? Das klingt so, als hättest du einen alten C89-Compiler benutzt, der seine Deklarationen am Anfang einer Funktion haben möchte.
-
das war es. Wusste nicht dass der microsoft compiler c89 macht.
Vielen Dank!
(Sorry dass ich in der C++ sektion geposted hab btw, ist aus Gewohnheit.)