如何在 unix 和 linux 中使用 STL?

2 compiling hp-ux c++ dynamic-linking

如何在 HP-Unix 中使用 STL(标准模板库)。如何编译和运行带有STL函数的程序?

Kei*_*thB 8

每个符合标准的编译器都应该带有 STL,因为它是标准库的一部分。第一个标准于 1998 年定稿,因此除非您使用的是非常旧的系统,否则它应该可用。您需要做的就是使用正确的#includes.

#include <vector>
std::vector<int> v;
Run Code Online (Sandbox Code Playgroud)