Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
@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

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;
share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.