题目
下列哪些头文件[1]包含在std命名空间[2]中? A.string B.iostream C.vector D.algorithm
下列哪些头文件[1]包含在std命名空间[2]中?
A.string
B.iostream
C.vector
D.algorithm
题目解答
答案
答案为A.string
C.vector
D.algorithm
这些头文件中的函数、类和其他标识符被定义在std命名空间中,因此在使用它们时需要加上"std::"前缀。另一方面,头文件B. iostream中的标识符被定义在全局命名空间中,不需要使用"std::"前缀。因此,选项A、C和D是包含在std命名空间中的头文件。