符号常量的使用
1 #include <iostream> 2 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 4 #define PRICE 30 5 using namespace std; 6 int main(int argc, char** argv) { 7 int num,total; 8 num=10; 9 total=num*PRICE; 10 cout <<"total="<<total<<endl; 11 return 0; 12 13 }