首先,这是我第一次编写代码,所以我是一个新手。错误'设置'没有在此范围内声明
我正在为使用devkit pro的nd编写代码,所以它全部用C++编写。我想要一个菜单,每个菜单屏幕都是空白的,我需要回到上一个菜单。
此外,我确信在实际的代码中,没有语法错误(除非在此范围内未声明被认为是语法错误)。
如何在没有获取的情况下执行此操作“错误'设置'未在此范围内声明”。代码:
//Headers go here
void controls()
{
//Inits and what not go here
if (key_press & key_down)
/*This is generally how you say if the down key has been pressed (This syntax might be wrong, but ignore that part)*/
{
settings(); //This part doesn't work because it can't read back in the code
}
}
void settings()
{
//Inits and what not go here
if (key_press & key_down)
{
controls();
}
}
void mainMenu()
{
//Inits and what not go here
if (key_press & key_down)
{
settings();
}
}
和注释,外面的这个代码的某个地方,MAINMENU()将得到激活。那么是否有人知道如何正确编码?
在此先感谢。
感谢您的快速响应;有用! :-) – 2013-03-04 17:21:04
我试图解释这个Mikhahail,但更好的解释,从你:) – OriginalCliche 2013-03-04 21:27:36