21

You know, with comments and examples and stuff.

Need a quick reference for when coding.

navand
  • 1,379
  • 1
  • 16
  • 20
  • 16
    +1 for not calling it "the STL" – Lightness Races in Orbit May 31 '11 at 17:11
  • Yeah I noticed the bickering in other questions. – navand May 31 '11 at 17:24
  • I won't say [the one on MSDN](http://msdn.microsoft.com/en-us/library/ct1as7hw.aspx) is the best, but I like it. – Benjamin Lindley May 31 '11 at 17:28
  • @Benjamin: So why don't you make that an answer? It seems as valid as mine. – Fred Larson May 31 '11 at 17:30
  • @Tomalak: Who calls it "the STL"? The STL is not the whole Standard Library. (Though it is the *coolest* part hehe) – Billy ONeal May 31 '11 at 18:42
  • @Billy: _Loads_ of people unfortunately. My minions do their best to fix these errors across SO, but I see it all the time. e.g. [1](http://stackoverflow.com/revisions/5647543/1), [2](http://stackoverflow.com/questions/541022/please-help-with-stl-stringstream), [3](http://stackoverflow.com/questions/1494182/setting-the-internal-buffer-used-by-a-standard-stream-pubsetbuf). It baffles me that this is so often denied. Anyway, I guess this question may not be the place for this... [this question](http://stackoverflow.com/questions/5205491/whats-this-stl-vs-c-standard-library-fight-all-about) is :D – Lightness Races in Orbit May 31 '11 at 23:25

5 Answers5

16

I don't know if I'd say it's "the best", but the online reference I use most often is the Apache C++ Standard Library Reference Guide. Maybe people use SGI's Standard Template Library Programmer's Guide.

Update:

These days, I mostly use cppreference.com.

Fred Larson
  • 60,987
  • 18
  • 112
  • 174
13

Along with a copy of the standard, I use cplusplus.com, mostly because it is the first result when I google std::vector.

Update:

These days, I mostly use cppreference.com.

Robᵩ
  • 163,533
  • 20
  • 239
  • 308
  • I couldn't have said it better myself. ;-) – Fred Larson Sep 30 '15 at 03:31
  • I liked `cplusplus.com`'s presentation better than `cppreference.com`'s one (in the meanwhile, got used to the latter's one as well), so I preferred the former, too -- *until* having to discover that it hasn't been up to date several times already. Since then, cppreference only. – Aconcagua Nov 18 '18 at 08:10
5

Do yourself a favour, and buy a book, such as The C++ Standard Library.

  • 1
    1) "Buy" != free (as the original post asked for). 2) "book" != online. You can't search (among other things). I have the C++ Prog Lang w/ 2011 (latest Stroustrup), and I love it, but it is falling apart due to its own weight not being held by the binding, FOR the amount of constant usage it receives. The copy I have has been repaired multiple times -- binding reglued, pages reglued w/wood glue, & various types of clear tape to hold pages and cover where glue wouldn't work. It's still falling apart. A book is not a substitute for an electronic reference, no matter how good the book. – Astara Apr 02 '17 at 20:09
4

The actual C++ Standard. Seriously. It's kind of expensive, but it's the only authoritative source out there. If you need specific docs on something Ctrl + F works just fine.

Billy ONeal
  • 104,103
  • 58
  • 317
  • 552
  • 1
    The draft of the new C++0x standard is [available freely](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3225.pdf) and makes an excellent general reference, though of course if in doubt you'll have to refer to the eventual published standard. Also: "Is it true that nobody owns the C++ standard?" -- "Probably, given the price." – Kerrek SB Jun 23 '11 at 11:52
  • @Kerrek: That is not the latest draft. The FCD was available for a while but was removed at the request of the International Standards Organization. – Billy ONeal Jun 23 '11 at 16:35
  • OK, thanks. Is the one I linked to sufficient though as a day-to-day reference? – Kerrek SB Jun 23 '11 at 22:26
  • @Kerrek: Depends. Are you a compiler developer? :) – Billy ONeal Jun 23 '11 at 22:34
  • 1
    Haha, no! Exactly - if I just want to write "normal" C++ code without exploiting the dark alleys of unexpected language behaviour, would that downloadable reference be sufficiently accurate and complete? It has a great STL reference, that alone would be worth a recommendation if there aren't any glaring differences to the actual standard. – Kerrek SB Jun 23 '11 at 22:48
  • 2
    Bjarne Stroustrup links this [newer working paper](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf) from his C++11-FAQ and says it's "close" to the FCD. – ian May 20 '12 at 00:49
0

Personally, I rely on mainly on cplusplus.com and cppreference

ricab
  • 2,697
  • 4
  • 23
  • 28