eclipse - C++ pass enum to object constructor -


say have following:

foo::foo() { value = 25; //default constructor... }  foo::foo(enum bar) { value = (int)bar; //purpose allow integer take enum constant's integer value. } 

from...

enum enum  { = 25, b = 50, }  class foo  { public:     foo();     foo(enum bar); private: int value; } 

yet, if following:

enum bar = a; //a = 25  foo * foo = new foo(a); //error: "undefined reference foo::foo(enum)" 

this in eclipse cdt 3.6. why happening? there can solve problem?

it sounds forgot link foo.c final application.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -