enum in .c-file
-
Hello! I tried to compile a library with VC++ 2008. However I get a compiler error which I don't understand - which only occurs in .c-Files:
struct MV_Vector_
{
enum ref_type { ref = 1 }; //C2208
};The enum leads to the error C2208 ('ref_type' : no members defined using this type). What is wrong with the code? Any ideas how to work that around? Thank you in advance, Alex
-
Hello! I tried to compile a library with VC++ 2008. However I get a compiler error which I don't understand - which only occurs in .c-Files:
struct MV_Vector_
{
enum ref_type { ref = 1 }; //C2208
};The enum leads to the error C2208 ('ref_type' : no members defined using this type). What is wrong with the code? Any ideas how to work that around? Thank you in advance, Alex
Try it :) :
struct MV_Vector_{
enum ref_type { ref = 1 } eref_member;
};virtual void BeHappy() = 0;
-
Hello! I tried to compile a library with VC++ 2008. However I get a compiler error which I don't understand - which only occurs in .c-Files:
struct MV_Vector_
{
enum ref_type { ref = 1 }; //C2208
};The enum leads to the error C2208 ('ref_type' : no members defined using this type). What is wrong with the code? Any ideas how to work that around? Thank you in advance, Alex
-
Hello! I tried to compile a library with VC++ 2008. However I get a compiler error which I don't understand - which only occurs in .c-Files:
struct MV_Vector_
{
enum ref_type { ref = 1 }; //C2208
};The enum leads to the error C2208 ('ref_type' : no members defined using this type). What is wrong with the code? Any ideas how to work that around? Thank you in advance, Alex
That's not
C
. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Try it :) :
struct MV_Vector_{
enum ref_type { ref = 1 } eref_member;
};virtual void BeHappy() = 0;