不明白此错误消息

时间:2013-10-01 20:48:24

标签: c++

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])

  

“错误:预期','或';'在'{'token“之前

1 个答案:

答案 0 :(得分:2)

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

} //You missed to close the curly brace

另外,请确保您匹配MWeatherMweather吗?如在评论中

相关问题