【发布时间】:2012-01-06 01:37:17
【问题描述】:
我已经寻找过类似的问题,但没有一个在我需要的上下文中。奇怪的是,我收到了这个错误,但以相同方式以代码设置的不同项目似乎运行良好。
我正在尝试将图像加载到 openGL 中的纹理中,并有一个接受此参数的函数:
GLuint loadTexture(LPTSTR szFileName);
然后我这样称呼它:
textureLib[0]= loadTexture("texturelib/texture1.bmp");
textureLib[1]= loadTexture("texturelib/texture2.bmp");
textureLib[2]= loadTexture("texturelib/texture3.bmp");
textureLib[3]= loadTexture("texturelib/texture4.bmp");
然后显示“1>e:\usb\uni work\graphics\coursework\coursework\main.cpp(291): error C2664: 'loadTexture' : cannot convert parameter 1 from 'const char [24]' to 'LPTSTR'"
如上所述,我拥有的另一个程序似乎允许它,所以如果有办法修复它以运行它,将不胜感激:)
【问题讨论】: