Howdy?!
I need help on a C++ class methods.
Say my class is:
class CMyClass
{
public:
void MyMethod( int a, int b);
}
class CMyNextClass: public CMyClass
{
public:
void MyMethod( int a, int b, int c);
}
void main()
{
CMyNextClass* pMyClass = new CMyNextClass();
pMyclass->MyMethod( 1, 2, 3);
}
I get an compiler error saying MyMethod function does not take 3 arguments.
I am very new to C++ and classes and is still in learning process.
I am trying to google if what i am doing violates C++ rule but i can't find an answer. I appreciate if someone can help.
Thanks!