J
john smith
Hi, say I have a class like so:
class A {
public:
virtual void foo();
void bar() const;
};
so when I actually define foo() and bar(), do I have to re-type the virtual
and const modifiers respectively? Is it more a matter of style?
So is this necessary?:
virtual void foo() {
//do something
}
void bar() const {
// do something
}
thanks in advance.
Kevin
class A {
public:
virtual void foo();
void bar() const;
};
so when I actually define foo() and bar(), do I have to re-type the virtual
and const modifiers respectively? Is it more a matter of style?
So is this necessary?:
virtual void foo() {
//do something
}
void bar() const {
// do something
}
thanks in advance.
Kevin