有关c++中string类型输出

我使用的是VC6.0
为什么使用如下语句就报错:
#include <iostream.h>
#include <string.h>
using namespace std;
void main()
{

string s1="asdf";
cout<<s1<<endl;
}
编译后:报如下错误:
error C2871: 'std' : does not exist or is not a namespace
error C2065: 'string' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 's1'
error C2065: 's1' : undeclared identifier

求救?
[535 byte] By [et1232006] at [2008-1-9]
# 1
#include <iostream.h>
#include <string.h>
==>
#include <iostream>
#include <string>

.h的文件是老文件格式,没有名字空间的。
# 2
就是使用新的文件格式就可以了吗?
et1232006 at 2007-10-19 > top of Msdn China Tech,C/C++,C语言...
# 3
谢谢楼上的,这样可以的,
还有一个问题:
#include <iostream.h>
#include <string.h>
{

string s1="asdf";
cout<<s1<<endl;
}
也报错,为什么?
et1232006 at 2007-10-19 > top of Msdn China Tech,C/C++,C语言...
# 4
std::string与流类不同,只有标准头文件中才有。
string.h不是string的无namespace版本,而是C的标准头文件,对应于C++的<cstring>,里面只有C风格字符串的处理函数,没有string类。
plainsong-短歌 at 2007-10-19 > top of Msdn China Tech,C/C++,C语言...
# 5
楼上的牛, 这样的细细细节都记得住,注意到。 -_-b
Writer-执着的灵魂 at 2007-10-19 > top of Msdn China Tech,C/C++,C语言...
# 6
迟了,都回答了
有了.h当然不能再用using namespace std
VCLIFE-linux&&qt at 2007-10-19 > top of Msdn China Tech,C/C++,C语言...
# 7
有 .h,就不可能有using namespace std.例如:<cstring>,<cstdlib>等等,是在标准C++环境下编译,前者无法通过的.
iq3050 at 2007-10-19 > top of Msdn China Tech,C/C++,C语言...
# 8
应该是
#include <string>
不是
#include <string.h>
这是两个不同的文件,你可以到vc的安装根目录去看看
richard_ma-中子星 at 2007-10-19 > top of Msdn China Tech,C/C++,C语言...
# 9
要包含标准头文件
#inlucde<string>
using namespace std;

string s("community.Codefund.cn");
cout <<s.c_str()<<endl;