LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 788|回复: 2

头文件上的错误

[复制链接]
发表于 2009-11-26 17:27:55 | 显示全部楼层 |阅读模式
头文件代码如下:
split.h
#include <iostream>
#include <vector>

bool space(char c);
bool not_space(char c);
vector<string> split(const string& s);

错误:split.h:6: error: expected constructor, destructor, or type conversion before ‘<’ token

实在想不明白 请大家帮忙看看
谢谢拉
发表于 2009-11-26 18:14:11 | 显示全部楼层
没有加名字空间吧,vector和string都在std下的。
回复 支持 反对

使用道具 举报

发表于 2009-11-27 20:53:10 | 显示全部楼层
应该using一下吧
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表