This is part of my main code that is giving me compiler issues.
//Find max value
max = max_element(vecTemperature.begin(), vecTemperature.end());
I keep getting an error saying "[Error] cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in assignment"
1 2 3 4 5
|
if( !vecTemperature.empty() )
{
const int max = *max_element(vecTemperature.begin(), vecTemperature.end());
// use max
}
|
Last edited on