[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I use libg++?

Posted on 1997-05-29
1
Medium Priority
?
248 Views
Last Modified: 2012-05-04
I have the most recent g++ compiler and libg++ on my Linux system.  I want to use the classes described in the documentation such as stacks and queues.  There are header files in /usr/include/g++ such as stack.h.  However, when I put

#include <stack.h>
stack stk;

into my program, I get a parsing error on the second line.  Furthermore, there is a /usr/include/g++/gen directory with a lot of .ccP and .hP files.  I think that these files actually have the classes that I want to use.

How can I use these classes?  

Thanks in advance!

Jeff Shirer
0
Comment
Question by:jshirer
1 Comment
 

Accepted Solution

by:
Morgoth earned 100 total points
ID: 1163746
Try typing -lg++ as a parameter when you compile, other than that, I can only guess that perhaps you haven't set it up properly(the directory structure).

0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question