声明类和命名空间时出现问题
Problems declaring classes and namespace
我声明了一个这样的类:
#include "BindableInterface.h"
#include "../LuaHelper.h"
#include <map>
#include <string>
namespace utils{
class CLuaHelper;
};
namespace zel{
namespace utils{
class CAPIBindManager
{
typedef std::map<std::string, CBindeableInterface*> t_exposedClassMap;
t_exposedClassMap m_classesToExpose;
utils::CLuaHelper* m_luaHelper;
public:
bool exportClasses(const unsigned char* data);
bool executeLuaChunk(const std::string fileName, const std::string funtionName);
bool addClassToExpose(CBindeableInterface* bindableInterface, const std::string alias);
CAPIBindManager(void);
~CAPIBindManager(void);
};
};
};
但是我得到一个编译错误,即CLuaHelper不是zel::utils的成员。CLuaHelper 被声明为 utils::CLuaHelper (不带 zel) 我需要如何声明这个类。 AFAIK,前向声明可能会解决这个问题
任何想法??
使用 ::utils::CLuaHelper
来区分两个utils
命名空间。
相关文章:
- 有关命名空间和模板参数的名称的问题
- 命名空间范围问题
- 在 c++ 中定义命名空间中模板类的友元函数时出现问题
- 从命名空间嵌入资源的问题(C++和CMake)
- 与自定义命名空间一起使用时实现 std::error_category、名称解析问题
- 关于"使用命名空间标准"的问题?
- 更改命名空间以自定义 Boost XML 的标记名称后的反序列化问题
- 有关通过派生类在命名空间内继承的问题
- C++相同的命名空间问题
- 是详细命名空间中的使用指导性的问题
- 命名空间内类的循环依赖问题
- 命名空间外部变量的未定义参考/多重定义,C 结构问题
- C++11 中的命名空间问题?
- C++中的编译错误可能是命名空间问题
- 命名空间问题:前向声明和混合命名空间
- C++命名空间问题
- C++ 全局命名空间编译问题
- 如何解决无法使用命名空间 std 的问题;在C++
- VS2013 在未命名命名空间中遇到基类问题
- LLVM设置函数传递的问题-命名空间问题