作者:jostree 转载请注明出处 http://www.cnblogs.com/jostree/p/4235721.html 1.为什么使用 const int 而不使用 #define 在使用#define时,比如#define Max 10000,如果出现错误,编译器并不会提示Max,因为在预处理阶段已经把Max替换成了10000,因此编译器会莫名其妙的提示10000这个数字出现了错误,从而不利于程序debug,但是如果使用const int Max=10000,编译器就会准确的提示Ma…