double highestTempOfYear(Mweather data[12]){
    vector<double> temps;
    for(int i = 0; i < 12; i++){
        temps.push_back(data[i].high_temperature);
        temps.push_back(data[i].low_temperature);
    }
    return *max_element(temps.begin(),temps.end());
}

double lowestTempOfYear(MWeather data[12]){
    vector<double> temps;
    for(int i = 0; i < 12; i++){
        temps.push_back(data[i].high_temperature);
        temps.push_back(data[i].low_temperature);
    }


在函数标题的行double lowestTempOfYear(MWeather data[12])上,


  “错误:预期为','或';'在“ {”令牌之前”

最佳答案

double lowestTempOfYear(MWeather data[12]){
// ...

} //You missed to close the curly brace


还要确保您匹配MWeatherMweather吗?如评论

10-07 19:17