Jump to content
  • Advertisement
Sign in to follow this  
sakatius

I just want some ListdataType classes to work with

This topic is 3835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently using Dev-Cpp, but apparently that doesn't come with STL? I found a website documenting STL here: here
Quote:
This is a short primer on the STL or "Standard Template Library" for the programming language C++ as defined in the 1997 standard.
I downloaded the .h files and placed them into the /includes folder and wrote code as they have on the site, but I'm still receiving errors. Is there a recommended and convenient way to import a header file and off the bat be able to begin using classes such as a generic LinkList? I think Java has spoiled me a bit. I'm frustrated with C++ because I've already written LinkList classes before, I can't justify reinventing the wheel and I'm not cozy enough with C++ to catch all my errors with pointers and such, surely there is a more standard/graceful way.

Share this post


Link to post
Share on other sites
Advertisement
Why don't you not use Dev-cpp?

Visual C++ express and Code::Blocks are free alternatives. I recommend microsoft's IDE if you're running Windows.

Share this post


Link to post
Share on other sites
I'm pretty sure STL is part of the default Dev-C++ install. At least if you installed the Dev-C++ with MingW compiler tools bundle for windows.

I don't think installing STL by copy/paste the header files is recommended either.

Make sure you include the header files without the .h extension. Eg.

#include <list> // Right
#include <list.h> // Wrong

If that doesn't help you could always try to reinstall Dev-C++

Share this post


Link to post
Share on other sites
Quote:
Original post by sakatius
I downloaded the .h files and placed them into the /includes folder and wrote code as they have on the site, but I'm still receiving errors. Is there a recommended and convenient way to import a header file and off the bat be able to begin using classes such as a generic LinkList?


The class is called 'list', it is in the namespace 'std' (so you write std::list, if you aren't 'using' the namespace or the list declaration), and it comes from the header '<list>' (no .h). If it doesn't work, something is wrong with your installation.

(Also, surely you can spare a couple of extra letters to describe your own effort as a LinkedList. After all, the links may be how you make the list, but they're not *what you store*.)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!