‘INTMAX_MAX’ was not declared in this scope
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When Compiling a simple code snippets: test.cpp : #include <stdint.h> #include <stdio.h> int main() { intmax_t max = INTMAX_MAX; printf("%jd", max); return 0; } I get this error: [huqiu@101 ~]$ g++ -o test.o test.cpp test.cpp: In function ‘int main()’: test.cpp:5: error: ‘INTMAX_MAX’ was not declared in this scope What I've done: The compiler information: [huqiu@101 ~]$ which g++ /usr/bin/g++ And the version: [huqiu@101 ~]$ g++ -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr