I have the following code structure
in my file myPlugin.h , i have defined this
virtual int speed();
and gave a dummy implementation in myPlugin.cpp
In another file otherPlugin.h I have included this line:
#include <myPlugin.h>
private:
int m_speed;
also class otherPlugin inherits myPlugin (public scope)
I want to redefine speed in otherPlugin.cpp
How should I return a value fromspeed() in it ?
int myPlugin::speed()
{
return m_speed;
}
or
int otherPlugin::speed()
{
return m_speed;
}
or anything else ?
The error I get is that: m_speed was not declared in this scope.
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.