运用vector出现的错误

小驴 2010-08-22 09:34:47
在一个对话框cpp中想用下vector,已经添加了头文件了
#include "stdafx.h"
#include "Calculator.h"
#include "CalculatorDlg.h"
#include <vector>

#ifdef _DEBUG


然后我在下面
vector <string> str;


怎么可能会出现错误呢? error C2143: syntax error : missing ';' before '<'

不解。。求解
...全文
64 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
小驴 2010-08-22
  • 打赏
  • 举报
回复
明白了,谢谢咯
zgsdzhaolanxiang1 2010-08-22
  • 打赏
  • 举报
回复
#include "stdafx.h"
#include "Calculator.h"
#include "CalculatorDlg.h"
#include <string>
#include <vector>

using namespace std;

#ifdef _DEBUG
zgsdzhaolanxiang1 2010-08-22
  • 打赏
  • 举报
回复
using namespace std;
zwfgdlc 2010-08-22
  • 打赏
  • 举报
回复

#include "stdafx.h"
#include "Calculator.h"
#include "CalculatorDlg.h"
#include <iostream>
#include <vector>

using namespace std;

#ifdef _DEBUG

19,466

社区成员

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

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