菜鸟问题,为什么我装了vc和msdn,但还不能用vector,iterator等类文件呢?

hewittlee 2004-05-03 05:01:23
近来我学用vc,当用到#nclude<vector>,#inlcude<iterator>等就不能编译了
,说没用定义,究竟是不是出了什么问题?请各位高手指点
...全文
105 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
是的,要加
using namespace std;

c编程的话,
#include<vector.h>
#inlcude<iterator.h>

c++编程的话
#include<vector>
#inlcude<iterator>
using namespace std;
itmaster 2004-05-06
  • 打赏
  • 举报
回复
#include<vector>
#inlcude<iterator>
using namespace std;

主要要用std名字空间
haiheng 2004-05-06
  • 打赏
  • 举报
回复
#nclude<vector>
using namespace std;
  • 打赏
  • 举报
回复
// 1.包函
#nclude<vector>
#inlcude<iterator>

// 2.申明前加std
std::string str_name;
std::vector vector_list;

蒋晟 2004-05-03
  • 打赏
  • 举报
回复
用非默认库之前先包含必须的头文件
feeboby 2004-05-03
  • 打赏
  • 举报
回复
加上一句
using namespace std;
看看

2,586

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 资源
社区管理员
  • 资源
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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