I have seen similar answers, but I don't seem to be able to solve mine just by looking at these for example ( this or that one for example).
So, I am having that .
A.h
#ifndef INCLUDE_CLASS_NAME
#define INCLUDE_CLASS_NAME
#include <B.h>
using namespace C;
D::DPtr myvariable; <-- Error in here
#endif
In the include B.h I have this :
namespace C{
namespace E{
class D
{
public:
typedef shared_ptr<D> DPtr;
}
} //end of namespace E
} // end of namespace C
Why am I getting this error in the mentioned line :
'D' does not name a type
I am including the .h file, which defines the class. What am I missing?