About STD?
请解释一下std是 ?
在看STL。
问题点数:60、回复次数:4Top
1 楼kof99th(小虫)回复于 2002-05-11 15:13:42 得分 20
是一个namespace.Top
2 楼Sunyata()回复于 2002-05-11 15:19:38 得分 20
right.
it's just a namespace, but a standard namespace for c++.
'standard' writes as 'std' for short, many functions in library
are encapsulated into std namespace.
to invoke them, you should open the namespace using namespace
directive or namespace declaration, you can explicitly add
std:: as well.Top
3 楼Tiango(我是农民啊!)回复于 2002-05-11 15:27:12 得分 0
Only a namespace?
Top
4 楼delphihero(何去何从)回复于 2002-05-11 16:19:09 得分 20
c++的 stl 库为了兼容以前的c程序,如<iostream.h> 里的函数在 c++ stl 里面是 <iostream> 里的,为了两个不冲突,老的c程序里面可以用 namespace 避免.一般 c++里面stl函数库写在 namespeace(名字空间) std 里面
如 using namespace std::string 就可以用 stl 里面的string 类了
using namespace std 的话就会使用 std 里面的全部内容Top




