i read somewhere that FIND() was best used with strings. I dunno if that's true or not, but since it's not working with my float vector, i just went ahead with my normal approach.
for(i=0; i<copy_nums.size(); ++i)
{
if(copy_nums[i] == min)
{
offset_min = i+1;
}
}
for(i=0; i<copy_nums.size(); ++i)
{
if(copy_nums[i] == max)
{
offset_max = i + 1;
}
}
cout << "\n\nThe min value you entered is " << min << "." << endl;
cout << min << " is #" << offset_min <<" in the list.\n" << endl;
cout << "\nThe max value you entered is " << max << "." << endl;
cout << max << " is #" << offset_max<<" in the list.\n" << endl;
}
Dawei, what exactly is CERR? I haven't seen that yet. Could you elaborate please?
thanks very much