2

How to use STL(standard template library) in HP-Unix . How to compile and run the program with STL functions?

  • @shankar in HPUX? or in linux? if linux what linux? different distro's might require different things... – xenoterracide Dec 3 '10 at 10:44
  • That's Standard Template Library. – Dennis Williamson Dec 4 '10 at 0:06
  • @shankar also is there some problem you're having with making the STL work? something you've already got, that you need to move forward on? e.g.. you have source and are trying g++ but are getting errors... – xenoterracide Dec 5 '10 at 9:46
8

Every standard conforming compiler should come with STL, as it is part of the standard library. The first standard was finalized in 1998, so unless you are using a really old system, it should be available. All you need to do is use the proper #includes.

#include <vector>
std::vector<int> v;
4

I guess all you need is a package providing the g++ command (plus all the dependencies, of course).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy