#include
using namespace std;
#define Day 7
int main(){
//Day = 7;
cout << "一周总共有:" << Day<< " 天" << endl;
system("pasuse");
return 0;
}
提示说是找到一个或多个重定义的符号 是因为 你用#define定义了一次 Day 将其定义为7 又在主函数定义一次,将其定为int整数类型。
#include<iostream>
using namespace std;
#define Day 7
int main(){
//Day = 7;
cout << "一周总共有:" << Day<< " 天" << endl;
return 0;
}
成功运行如图:
把提示的那个符号在全局搜索,删掉多余的申明
把Day=7;这句注释掉应该没错的