I\'m having problems trying to use the friend feature of C++. I have these interfaces:
#pragma once
#include \"Mesh3D.h\"
#include
namespace t
See if something like this works a bit better (for the moment, I've merged them into a single source file).
#include <string>
namespace tools {
namespace sysInput {
class CGeometryManager3D;
}
}
namespace render {
class CMesh3D
{
public:
friend class tools::sysInput::CGeometryManager3D;
CMesh3D(void);
~CMesh3D(void);
};
}
namespace tools {
namespace sysInput{
class CGeometryManager3D
{
public:
bool loadFromFile(render::CMesh3D& mesh, std::string filename);
CGeometryManager3D(void);
~CGeometryManager3D(void);
};
};
}
I guess you need to remove following code in the second file:
#include "GeometryManager.h"
class CGeometryManager3D;
The first line causes circular inclusion as the comments in the question suggests;
The second line declares a totally irrelevant class as it is in the global name space;