tags:

views:

457

answers:

10

hi,

I've just finished reading 'accelerated c++', which i really enjoyed, but i am wondering which book will make a good 'next step' ? I would like a book that emphasizes writing idiomatic c++ over and above simply learning language features (in the style of accelerated c++)

thanks,

+1  A: 

You should definitely look at Bruce Eckel`s "Thinking in C++", both volumes
first volume
second one
books are really-really useful and simply a joy to read

chester89
Excepted if they were rewritten in depth, they don't teach at all the same style of C++ programming than AC++, but a far more dated one.
AProgrammer
+5  A: 

Effective C++: 55 Specific Ways to Improve Your Programs and Design

William
I'm not sure that it is a good next step after AC++, for two reasons: (1) excepted if it has been reviewed in depth in the latest editions, some of the items are really outdated, (2) I'm not sure AC++ leave you in a state ready to take advantage of EC++.
AProgrammer
+6  A: 

The C++ Programming Language: Bjarne Stroustrup

Not a bad choice, perhaps too much targetted teaching C++ (and being a C++ reference) as opposed to the "teaching programming using C++" that AC++ does.
AProgrammer
+1, Real good choice if you are thinking of learning C++, as this comes from the "father of C++"
+2  A: 

Exceptional C++ by Herb Sutter

I highly recommend the chapter on the Pimpl Idiom, use it all the time. eg.

header file
Class BlahImp;
Class Blah
{
public:
   void a();
private:
   BlahImp *m_imp;
};

cpp file
// ctor and dtor of Blah new and delete m_imp

class BlahImp
{
public:
    void a()
    {
     // private implementation of a() that stops other types and classes being exposed
    }
};

void Blah::a()
{
    m_imp->a();
}

Contents: Exceptional C++ contains 47 Items organized into eight major sections:

  • Generic programming and the C++ standard library.
  • Exception safety issues and techniques.
  • Class design and inheritance
  • Compiler firewalls and the Pimpl Idiom.
  • Name lookup, namespaces, and the Interface Principle.
  • Memory management.
  • Traps, pitfalls, and anti-idioms.
  • Miscellaneous topics.
Rudi Bierach
Probably out of reach for someone who just finished AC++.
AProgrammer
These are the topics I teach my junior programmers early on so they end up on the right track ;) I also recommend reading as much good open source code as you can get your hands on such as the boost library, ACE Wrappers, cppunit and the odd GUI framework. It depends highly on what sort of code banister wishes to work on since that will alter which APIs he has to work with and can influence with design patterns will make sense. The Design Patterns GoF book is well worth for juniors to read early on http://en.wikipedia.org/wiki/Design_Patterns_(book)
Rudi Bierach
+2  A: 

I would strongly recommend The C++ Standard Library, to get a really good understanding of how the library works and should be used. And by the same (co)author, C++ Templates: The Completec Guide to get a deeper understanding of the use of templates in C++.

anon
The C++ Standard Library is also a good choice, but suffers from the same potential problem as TC++PL (too targetted to people already knowing programmation)C++ Templates is out of reach for banister until he has more experience in C++.
AProgrammer
+5  A: 

I think you should do some practice before reading more. Programming is a skill which is better learn by doing instead of reading. I'm not really knowledgeable about books for beginners. I've commented above the propositions made. I summarize here:

  • The C++ Programming language and The C++ Standard library are good choices, especially if you already know programming. As they are references, you'll keep referring to them for a long time.

  • Exceptional C++ and C++ Templates, the Complete Guide are good books, still current, but if your only experience with C++ is AC++, they are probably too advanced for you. Even more if you lack programming experience.

  • Thinking in C++ was a good book in its first edition but is is dated now: it is one of the finest example of the "old fashioned teaching of C++" when AC++ aims to show the "modern way of teaching C++". I haven't read the second edition but by looking at the table of content, it hasn't been reworked in depth enough to be what you search.

  • Effective C++ is aimed at the intermediate level programmer. It could be too advanced for you. The edition I've (which isn't the latest) suffers from the same problem as Thinking in C++, it is quite dated. It is divided in items, some of them are still current, some are better skipped. In that series, Effective STL is probably nearer to what you want.

AProgrammer
+3  A: 

C++ Coding Standards by Alexandrescu and Sutter is a good follow-up. It's not too technical, but has a lot of professional advice for C++ programming.

MadKeithV
+1 from me! The book contains a lot of useful advice and best practices, definitely worth reading also for a beginner.
Paolo Tedesco
A: 

Modern C++ Design by Alexandrescu. Trying to understand that book will force you to get deep into the language. :-)

radu_c
and, from the little I've seen of it, cause your brain to spontaneously explode.
Dominic Rodger
Friends don't let friends read Modern C++ Design.Especially if they might have to maintain their friends' code later.
MadKeithV
I love that book, but it's not exactly something you should read immediately after you've learnt the syntax...
Paolo Tedesco
Very clever ideas in this book, but it's certainly not bread and butter coding. I've used some tricks from this book when writing a auto_ptr class that need to do delete [] or delete depending on the pointer type (the old enums can be used to make code generation decisions), but that is because I needed an auto_ptr that only did delete on leaving scope and strictly no ownership transfer out.
Rudi Bierach
A: 

you can use together these two books, C++ Primer by Stanley B. Lippman and C++ Primer Answer Book by Clovis L. Tondo

pulikar
A: 

Start coding!

After that, Exceptional C++ by Herb Sutter and The C++ Programming Language by Bjarne Stroustrup.

Chaoz