I have Foo.hpp and Foo.cpp, i'd like to define a virtual function
virtual void setValue(int val){
}
Would the following implementation be correct:
Foo.hpp
#ifndef _FOO
#define _FOO
class Foo{
public:
Foo();
virtual void setValue(int val);
};
#endif
Foo.cpp
Foo::setValue(){
}
I realise it would be easier if i kept it to one file, but this is just a simplification of a more complex structure.