Prev: error C2039: 'Eip' : is not a member of '_CONTEXT'
Next: error C3646: 'exception' : unknown override specifier
From: Emmanuel Stapf [ES] on 29 Dec 2008 13:09 I had some code that looks like: DECIMAL dec; .... dec->scale ... which compiled fine until I use the latest Platform SDK (v6.1) for which I get the following error: error C2039: 'scale' : is not a member of 'tagDEC' C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\wtypes.h(1068) : see declaration of 'tagDEC' What is the proper way to have this code compile fine on older version of the wtypes.h header and the new ones? Thanks, Manu
From: David Lowndes on 29 Dec 2008 13:52 >I had some code that looks like: > >DECIMAL dec; > >... dec->scale ... >which compiled fine until I use the latest Platform SDK (v6.1) for >which I get the following error: > >error C2039: 'scale' : is not a member of 'tagDEC' > C:\Program Files\Microsoft >SDKs\Windows\v6.1\Include\wtypes.h(1068) : see declaration of 'tagDEC' > >What is the proper way to have this code compile fine on older version >of the wtypes.h header and the new ones? What is the definition of struct tagDEC in the newer wtypes.h file? Dave
From: Brian Muth on 29 Dec 2008 14:10 Also, what version of VS are you using?
From: Emmanuel Stapf [ES] on 29 Dec 2008 15:56 The old definition look like: typedef struct tagDEC { USHORT wReserved; union { struct { BYTE scale; BYTE sign; }; USHORT signscale; }; ULONG Hi32; .... } DECIMAL; The new one like: typedef struct tagDEC { USHORT wReserved; union { struct { BYTE scale; BYTE sign; } DUMMYSTRUCTNAME; USHORT signscale; } DUMMYUNIONNAME; ULONG Hi32; .... } DECIMAL; I have to compile my code using -DNONAMELESSUNION but can't recall if I still need to do that. Regards, Manu David Lowndes wrote: >> I had some code that looks like: >> >> DECIMAL dec; >> >> ... dec->scale ... >> which compiled fine until I use the latest Platform SDK (v6.1) for >> which I get the following error: >> >> error C2039: 'scale' : is not a member of 'tagDEC' >> C:\Program Files\Microsoft >> SDKs\Windows\v6.1\Include\wtypes.h(1068) : see declaration of 'tagDEC' >> >> What is the proper way to have this code compile fine on older version >> of the wtypes.h header and the new ones? > > What is the definition of struct tagDEC in the newer wtypes.h file? > > Dave
From: Emmanuel Stapf [ES] on 29 Dec 2008 15:56 The old definition look like: typedef struct tagDEC { USHORT wReserved; union { struct { BYTE scale; BYTE sign; }; USHORT signscale; }; ULONG Hi32; .... } DECIMAL; The new one like: typedef struct tagDEC { USHORT wReserved; union { struct { BYTE scale; BYTE sign; } DUMMYSTRUCTNAME; USHORT signscale; } DUMMYUNIONNAME; ULONG Hi32; .... } DECIMAL; I have to compile my code using -DNONAMELESSUNION but can't recall if I still need to do that. Regards, Manu David Lowndes wrote: >> I had some code that looks like: >> >> DECIMAL dec; >> >> ... dec->scale ... >> which compiled fine until I use the latest Platform SDK (v6.1) for >> which I get the following error: >> >> error C2039: 'scale' : is not a member of 'tagDEC' >> C:\Program Files\Microsoft >> SDKs\Windows\v6.1\Include\wtypes.h(1068) : see declaration of 'tagDEC' >> >> What is the proper way to have this code compile fine on older version >> of the wtypes.h header and the new ones? > > What is the definition of struct tagDEC in the newer wtypes.h file? > > Dave
|
Next
|
Last
Pages: 1 2 Prev: error C2039: 'Eip' : is not a member of '_CONTEXT' Next: error C3646: 'exception' : unknown override specifier |