call a class-function inside another function in same class
How can i call a function of a class inside another function of the same class?
Hi there,
you can just call it by its name, or use the
this pointer:
1 2 3 4 5 6
|
class example
{
void foo() { /* ... */ }
void bar() { foo(); }
void baz() { this->foo(); }
};
|
Hope that helps.
All the best,
NwN
what about virtual??
Topic archived. No new replies allowed.