向量下标超出范围-尚无使用,但它们超出范围..为什么会这样? [英] Vector Subscript out of Range - There aren't any in usage yet they go out of range.. why is this ??
问题描述
喜欢779(请给我发送解决方案的电子邮件)>>请给我发电子邮件 tommycannadyIII@gmail.com AND或 tommyciii@gmail.com ...
like 779(please email me the solution) >> please email me at tommycannadyIII@gmail.com AND or tommyciii@gmail.com...
向量下标超出范围 而且我不能肯定地说为什么....这是代码....
vector subscript is out of range and i can't say why for sure.. .. here is the code....
int WINAPI WinMain(HINSTANCE hInstance,
int WINAPI WinMain( HINSTANCE hInstance, // Instance
HINSTANCE hPrevInstance,
HINSTANCE hPrevInstance,
//以前的实例
LPSTR lpCmdLine
LPSTR lpCmdLine,
//命令行参数
int nCmdShow)
int nCmdShow) // Window Show State
{
//返回0;
味精味精;
//Windows消息结构
BOOL done = FALSE;
BOOL done=FALSE;
//布尔变量退出循环
全屏= FALSE;
fullscreen =FALSE;
//窗口模式
//创建我们的OpenGL窗口
如果 (!CreateGLWindow(
if (!CreateGLWindow("OpenGL Texture Mapping Tutorial",640,480,16,fullscreen))
{ 返回 0; //如果未创建窗口,则退出 return 0; // Quit If Window Was Not Created } 同时 (!done) while(!done) // Loop That Runs While done=FALSE { 如果 (PeekMessage(& msg,NULL,0,0,PM_REMOVE)) //是否正在等待消息?
if (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) // Is There A Message Waiting?
{
如果 (msg.message == WM_QUIT)
if (msg.message==WM_QUIT) // Have We Received A Quit Message?
{done = TRUE;
{ done=TRUE;
//如果这样做= TRUE
}
其他
else // If Not, Deal With Window Messages
{TranslateMessage(& msg);
{ TranslateMessage(&msg);
//翻译邮件
DispatchMessage(& msg);
DispatchMessage(&msg);
//分发邮件
}
}
其他
else // If There Are No Messages
{
//绘制场景.监视ESC键并从DrawGLScene()中退出消息
如果 ((active&!DrawGLScene())||键[VK_ESCAPE]) //有效吗?
if ((active && !DrawGLScene()) || keys[VK_ESCAPE]) // Active? Was There A Quit Received?
{done = TRUE;
{ done=TRUE;
//ESC或DrawGLScene发出退出信号/span>
}
其他
else // Not Time To Quit, Update Screen
{SwapBuffers(hDC);
{ SwapBuffers(hDC);
//交换缓冲区(双缓冲)
}
如果 (键[VK_F1])
if (keys[VK_F1]) // Is F1 Being Pressed?
{键[VK_F1] = FALSE;
{ keys[VK_F1]=FALSE;
//如果这样,则将其设置为FALSE
KillGLWindow();
KillGLWindow();
//杀死我们当前的窗口
fullscreen =!fullscreen;
fullscreen=!fullscreen;
//切换全屏/窗口模式
//重新创建我们的OpenGL窗口
如果 (!CreateGLWindow(
if (!CreateGLWindow("NeHe's Texture Mapping Tutorial",640,480,16,fullscreen))
{ 返回 0; //如果未创建窗口,则退出 return 0; // Quit If Window Was Not Created } } } } //关闭 跨度> KillGLWindow(); KillGLWindow(); //杀死窗户 返回 (msg.wParam); //退出程序 return (msg.wParam); // Exit The Program } 这篇关于向量下标超出范围-尚无使用,但它们超出范围..为什么会这样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!推荐答案
您的代码甚至没有使用向量.大概问题出在您正在使用的具有CreateGLWindow功能的任何库中.
Your code doesn't even use a vector. Presumably the problem is in whatever library you're using that has the function CreateGLWindow.