>>It seems like Visual Studio 2010 compiler is complaining that despite all classes are in the same namespace, the abstract class's pure abstract method is not implemented.
I think you mis-interpreted the error message -- see comment below.
This works ok for me using vc++ 2010 express. The only change I had to make was make variable a in ParentClass protected so that it can be used in derived class.
#include "IBaseClass.h"
#include "ParentClass.h"
#include "concreteClass.h"
using namespace std;
namespace MyCustomNamespace
{
void ConcreteClass::setB(const int bb) { this->b = bb; }
const int ConcreteClass::getB() const { return this->a; }
bool ConcreteClass::Method001(/*some input*/)
{
//implementation code goes here...
return true;
}
} /*NAMESPACE*/
int main()
{
MyCustomNamespace::ConcreteClass c;
} Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343