【发布时间】:2009-11-08 23:47:47
【问题描述】:
我在 C++ 方面并不太胜任,这个编译器错误对我来说毫无意义。下面一行调用了标题所示的编译器错误:
m_SunTexture = LudoTextureManager::GetInstance()->GetTextureData(hardcoded.c_str()).m_Texture;
m_SunTexture 在我的头文件中定义为
IDirect3DTexture9 *m_SunTexture;
在我的头文件的私有部分。为什么是这样!这对我来说毫无意义。
根据要求,这里有更多代码。 m_SunTexture 在这个函数中被调用
void Sun::DrawSun()
{
std::wstring hardcoded = L"..\\Data\\sun.jpg";
m_SunTexture = LudoTextureManager::GetInstance()->GetTextureData(hardcoded.c_str()).m_Texture;
//more code here, cut off because it's useless for this.
}
DrawSun 在头文件中定义为:
static void DrawSun();
在我的头文件的公共部分下。
【问题讨论】:
-
这需要更多代码才能理解。
-
真的吗?我会尝试添加更多可能有用的内容..但我看不出任何其他代码会有什么帮助
标签: c++ compiler-errors