C ++错误:未处理的异常 [英] C++ error: Unhandled exception

查看:116
本文介绍了C ++错误:未处理的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用代码。在我解决了所有错误后,我试图运行程序,但它一直给我一个未处理的异常。

这是给出例外的部分:



Hi,
I''m working with a code. After I resolve all the errors I tried to run the program, but it keeps giving me an unhandled exception.
This is the part that gives the exception:

using namespace nv;
nv::GlutUIContext ui;

void doUI()
{
	static nv::Rect none;
	static nv::Rect labelRect(12,12);
	static nv::Rect glowButtonRect(300,20,0);
	static nv::Rect wireButtonRect(300,60,0);
	static nv::Rect sliderRect(0,0,100,12);
	static const char*modelOption[]={"sphere", "tetra", "cube", "venus"};
	static const char*bufferOptions[]={"RGBA8", "RGBA16F", "RGBA32F", "R11F_G11F_B10F"};
	static const GLenum bufferTokens[] = { GL_RGBA8, GL_RGBA16F_ARB, GL_RGBA32F_ARB,    GL_R11F_G11F_B10F_EXT};
	static int comboSelected = 0;
	ui.begin();
	ui.beginGroup(nv::GroupFlags_GrowDownFromLeft);
	ui.doLabel(none,"HDR demo");
	ui.doCheckButton(none,"Glow",&options[OPTION_GLOW]);
	ui.doCheckButton(none,"Draw Skybox",&options[OPTION_DRAW_SKYBOX]);
	ui.doCheckButton(none,"Draw Wirefram",&options[OPTION_WIREFRAME]);
    ui.endGroup();
	ui.end(); 



...



当运行ui.begin的代码时,它给了我未处理的异常。

有谁知道问题是什么?

欢迎任何帮助。

干杯,

JePhyuilor


...

When running to the code of ui.begin,it gives me the unhandled exception.
Does anyone know what the problem is?
Any help is welcome.
Cheers,
JePhyuilor

推荐答案

看起来你正在使用 nvidia-widgets [ ^ ]。如果是,也许您可​​以查看那里提供的示例,例如这一个 [ ^ ]。



您是否确定您的GlutUIContext已正确初始化?在调用doUI之前,是否已执行glutInit,glutCreateWindow,ui.init并检查错误?



我希望这有帮助
It looks like you''re using nvidia-widgets[^]. If yes, maybe you can check out the example provided there, like this one[^].

Have you made sure your GlutUIContext is initialized properly? Have glutInit, glutCreateWindow, ui.init been executed and checked for errors before the doUI is called?

I hope this helps


您应该明智地使用调试器来找到有问题的行(可能是doSomething调用之一)并最终在此处报告此类信息。
You should wisely use the debugger to locate the offending line (possibly one of the doSomething calls) and eventually report such info here.


这篇关于C ++错误:未处理的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆