我一直收到这个错误:
警告:没有构造函数的类中的非静态const成员'const char sict :: Weather :: _ date [7]'[-Wuninitialized]
我不明白.
#include <iostream>
#include <iomanip>
#include "Weather.h"
using namespace std;
namespace sict{
int main(){
int n;
Weather* weather;
cout << "Weather Data\n";
cout << "=====================" << endl;
cout << "Days of Weather: ";
cin >> n;
cin.ignore();
weather = new Weather(n);
for (int i = 0; i < n; i++){
char date_description[7];
double high = 0.0, low = 0.0;
cout << "Enter date: ";
cin >> date_description;
cout << …Run Code Online (Sandbox Code Playgroud) c++ ×1