views:

133

answers:

5

Hello everyone!

I have an upcoming exam on Programming using C++ and we can take consultation material. I have decided to take a reference as well as some code examples, etc.

Which reference should I take?

Here's what I have available at the college's library:

The C++ standard library : a tutorial and reference

STL tutorial and reference guide : C++ Programming with the standard template library

(please mind I'm a beginner when choosing)

Often there's a question involving the algorithms of the STL and why I would choose X container over Y container. That's where the reference would come in handy.

Thanks for your time!

+5  A: 

I realise that neither of these is on your list, but I'm not sure if you have to choose one of those. If you do, tough luck. If you don't: C++ in a Nutshell or C++ Pocket Reference.

I'd never take a tutorial book into an exam, when ease and speed of access to facts is what I need. The exam is not the place to be learning the language, so the tutorial pages are irrelevant.

High Performance Mark
+1 i agree, a reference is much better to have, maybe also one on templates/stl since that could be tricky sometimes.
Anders K.
+1. Also examinators should always take in account that nobody learns by heart library functions, so IMHO they should provide OP with the reference. Fortunately OP is allowed to bring one himself!
Dacav
+1  A: 

Of the two you mention, "STL tutorial and reference guide : C++ Programming with the standard template library" covers a subset of what "The C++ standard library : a tutorial and reference" covers. (The STL is a big part of the standard library, but there is other stuff.)

Depending on what your exam is about, either you go for the the latter, hoping its specialization makes it a superior STL reference (I don't know the book, BTW), or you go for the more general, because it covers more topics.

Note that, since these aren't strict reference books (although I remember that Josuttis' book has big referential sections), you should take time before-hand to become familiar with the structure of the book you're using, so you know exactly where to look for whatever you need to look up.

sbi
+1  A: 

I am optimistic that it hardly matters, since you know everything so well by now. Right?

Choose the one you frequently consult, often read, and whose page layout you visualize when you try to remember something obscure. Choose the most familiar, most wrinkled reference on your shelf.

Josephine
+3  A: 

Write up your own "cheat sheet" based on what you find in the books. For example write the information about the algorithms and their speed or whatever. In many of my courses we were allowed just a single sheet of paper but could write as small as we wanted and use both sides. Sit down with the books and gather up what you think is important and write it out yourself with a pen. Doing this will almost certainly ensure that you never need to look at it because you will just remember it. However if you have a "brain freeze" you will have the piece of paper and it will be quicker to look on that than to page through a huge book that is not organized for exam-question-answering.

Kate Gregory
A: 

I strongly suggest springing for a copy of "The C++ Programming Language" by Stroustrup. It's a bit pricey, but you can probably find a second-hand copy cheap. And it's a book you'll keep using as long as you're programming in C++.

Stroustrup is the guy who invented C++: he as really good insight in to how particular language features should be used, where the pitfalls are, and really good examples throughout the book. That book also has great reference tables on each topic; short of getting the full C++ standard, you won't find a better reference.

The level of the book is a bit over a beginner's, but if you take your time in the first three chapters, you should do just fine.

Having used C++ more than a decade, it's the only book I keep going back to, and the only one I still recommend to anyone trying to learn C++.

smithco
It's a very poor reference book.
anon