A
Angus
If I have these classes:
class TBase
{
public:
virtual int Execute(Server* srv) = 0;
virtual ~TFunction() {}
};
class Derived : public TBase
{
public:
Derived(const std::string& strA, int ia1)
: m_strA(strA), m_ia1(ia1){
}
virtual int Execute(TServer srv)
{
return SomeFunction(srv, m_strA, m_ia1);
}
~TRegister() { }
private:
std::string m_strA;
int m_ia1;
};
I want to call the Execute function on a Derived object. How can I
call it?
class TBase
{
public:
virtual int Execute(Server* srv) = 0;
virtual ~TFunction() {}
};
class Derived : public TBase
{
public:
Derived(const std::string& strA, int ia1)
: m_strA(strA), m_ia1(ia1){
}
virtual int Execute(TServer srv)
{
return SomeFunction(srv, m_strA, m_ia1);
}
~TRegister() { }
private:
std::string m_strA;
int m_ia1;
};
I want to call the Execute function on a Derived object. How can I
call it?