[求助] 请大家帮助 编译不能通过 提示 expected `;' before "iter"
请大家帮助 编译不能通过 提示 expected `;' before "iter" 谢谢了!!!#include <iostream>
#include <cstdlib>
#include <vector>
using namespace std;
template <class elemtype>
elemtype min( const vector<elemtype> &vec)
{ elemtype temp=vec[0];
for( vector<elemtype>::iterator iter = vec.begin();iter!=vec.end();iter++)
if(temp>*p)
temp=*p;
return temp;
}
int main() {
int ia[]={15,5,13,25,17,99,102,56,18,13,25};
vector<int>vi(ia,ia+11);
cout<<min(vi);
system("pause");
}