调试器将我的某些命令视为未声明的变量 [英] The debugger sees some of my commands as undeclared variables
本文介绍了调试器将我的某些命令视为未声明的变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我遇到问题的代码.当我进入命令cout和cin时,就会出现问题,其中调试器(和编译器,即GNU)将命令视为未声明的变量.请告诉我问题和解决方法.谢谢.
here is the code where im having the problem. the problem arises when i get to the commands cout and cin, where the debugger (and compiler, which is GNU) see the commands as undeclared variables. Please tell me the problem and solution. thanks.
#include (cstdio)
#include (cstdlib)
#include (iostream)
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
int nNumber;
int nNumber2;
cout << "numero uno - " << endl;
cin >> nNumber;
cout << "nombre du - " << endl;
cin >> nNumber2;
cout << "the equation = \n" << endl;
cout << (nNumber - nNumber2 * nNumber) + 5;
cout << "\n" << endl;
system("PAUSE");
return 0;
}
[edit]已添加代码块-OriginalGriff [/edit]
[edit]Code block added - OriginalGriff[/edit]
推荐答案
您是否实际上使用圆括号(即"()
")来包含头文件?
您应使用不等号(例如``<>
''),例如
Do you actually use the round brackets (i.e ''()
'') to include header files?
You should use the inequality signs (i.e. ''<>
''), for instance
#include <iostream>
//..
通常,include的语法为:
Normally the syntax for the include would either be:
#include <cstdio.h>
或
or
#include "cstdio.h"
不知道将其放在括号中会发生什么. cout和cin应该在iostream中定义.h
Not sure what happens when you put it in parenthesis. cout and cin should be defined in iostream.h
这篇关于调试器将我的某些命令视为未声明的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文