为什么不对????高手请进

chinaeagle 2002-08-03 09:11:27
#include<iostream>
#include<list>
#include<algorithm>
//#include<allocator>
using namespace std;
//利用摸板求最大最小值
int main()
{
int arr[]={1,2,3,4,5};
list<int> intlist=(arr,arr+4);
list<int>::iterator it;
it=max_element(intlist.begin(),intlist.end());
cout<<"the maxium element is:"<<*it<<endl;
it=min_element(intlist.begin(),intlist.end());
cout<<"the minium element is:"<<*it<<endl;
system("pause");
return 0;
}


为什么通不过??
C:\My Documents\
std::list<int, std::allocator<int> >' requested

...全文
74 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
chinaeagle 2002-08-04
  • 打赏
  • 举报
回复
to seashoreboy(海滨)
解决!多谢!
太疏忽了!
kwok_1980 2002-08-04
  • 打赏
  • 举报
回复
to: wangxiaodong1980() 这样写是可以的:#include <iostream>
kwok_1980 2002-08-04
  • 打赏
  • 举报
回复
to: wangxiaodong1980() 这样写是可以的:#include <iostrea>
wangxiaodong1980 2002-08-04
  • 打赏
  • 举报
回复
#include<iostream.h>
vs_net 2002-08-03
  • 打赏
  • 举报
回复
只有5 分太瘦了。

下次大放点就会有很多人来了
seashoreboy 2002-08-03
  • 打赏
  • 举报
回复
将list<int> intlist=(arr,arr+4);

改为list<int> intlist(arr,arr+4);
seashoreboy 2002-08-03
  • 打赏
  • 举报
回复
list<int> intlist=(arr,arr+4);
改成list<int> intlist(arr,arr+4);

70,020

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧