2013-01-08 160 views
-1
INT32_MAX was not declared in this scope 

这是什么解决方案(在C++中发生错误)?C++ INT32_MAX未在此范围内声明

+1

您是否包含“”或“”? –

+2

[error:'INT32 \ _MAX'在此范围内未声明]的可能重复(http://stackoverflow.com/questions/3233054/error-int32-max-was-not-declared-in-this-scope) – Angew

+0

#include #include using namespace std; () { char ch; cout << INT32_MAX << end; cin >> ch; return 0; }这是我编写的程序,但这是行不通的 – Geehan

回答

2

INT32_MAX<stdint.h>中定义。您需要:

#include <stdint.h> 

出现问题的源文件。

+0

是的,我包含它#include #include using namespace std; () { char ch; cout << INT32_MAX << end; cin >> ch; return 0; } – Geehan

+2

标题应该是,而不是两者的组合,如同您的情况()。 –