调试有错误,请求指导
template<class Iterator >Iterator high(Iterator first, Iterator last)
{
Iterator high = first;
for (Iterator p = first; p!=last; ++p)
if (*high<*p) high = p;
return high;
}
vector<double>* get_from_jill()
{
//
}
void main()
{
vector<double>* jill_data = get_from_jill();
double* jill_high =high(&jill_data[0],&jill_data[0]+jill_data->size());
cout << "Jill's high is " << *jill_high <<endl;
delete jill_data;
}
在调试的时候double* jill_high =high(&jill_data[0],&jill_data[0]+jill_data->size());这句是有错误的,我也知道是类型不对,但是不知道该怎么改,求指导!!!!