• Advertisement
Sign in to follow this  

STL

This topic is 4344 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

Do you know good links to learn how to use the STL ? cheers !!

Share this post


Link to post
Share on other sites
Advertisement
by the way, what is the difference between :


#include <stdio.h>

and

#include <stdio>
using namespace std;

Share this post


Link to post
Share on other sites
There is no difference. But second one is prefered if you are programming C++ code.

Share this post


Link to post
Share on other sites
If I remember correctly, there is a small difference - the <xxx.h>
variation brings stuff into the standard namespace (or sth like that)
They are there for backwards compatibility

Just use the one without the <xxx.h>

Share this post


Link to post
Share on other sites
Quote:
Original post by jolyqr
by the way, what is the difference between :


#include <stdio.h>

and

#include <stdio>
using namespace std;


I hope you mean <cstdio>

The first one is antiquated/deprecated in c++, and is included only for backward compatability. See here.

Share this post


Link to post
Share on other sites
A random STL tutorial

Just a google for 'STL tutorial' will show up many hits. Just be careful, if you stumble across a website which uses the STL headers ending in .h (#include <iostream.h> as opposed to #include <iostream>), scrap it, it is too old/non-standard. Standard C++ has the newer headers without .h suffix.

Edit: Damn I'm slow.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kylotan
Moving to For Beginners.



euh... i think it's already there...

Share this post


Link to post
Share on other sites
Quote:
Original post by Kitt3n
If I remember correctly, there is a small difference - the <xxx.h>
variation brings stuff into the standard namespace (or sth like that)
They are there for backwards compatibility

Just use the one without the <xxx.h>


using namespace std; does the same thing - brings stuff in current namespace.

Share this post


Link to post
Share on other sites
Be wary of anything you read on the web. There's a lot of misinformation out there. The best and only respectable reference/tutorial I know of for the C++ standard library ("STL" is an antiquated term that only coveres part of the library), is Nicolai Josuttis' book, "The C++ Standard Library". Found here:

http://www.amazon.com/gp/product/0201379260/sr=8-1/qid=1143926775/ref=pd_bbs_1/102-0254641-9177773?%5Fencoding=UTF8

Share this post


Link to post
Share on other sites
Quote:
Original post by jolyqr
Quote:
Original post by Kylotan
Moving to For Beginners.


euh... i think it's already there...


It was in AI when I saw this thread. Someone might have managed to move it a few seconds before I did.

Share this post


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

  • Advertisement