I've been searching a lot for an answer and can´t find it anywere. Say i have:
class foobar{
public:
char foo() const;
};
, in my foobar.h
When I want to implement this class in foobar.cpp should I repeat const?:
char foobar::foo() const{
//...my code
}
Or can i do (whitout the const)
char foobar::foo() {
//...my code
}
If this is a duplicate I'm sorry, but no other question truly answered this.