04.01.2015 Views

Thinking in C++ 2nd ed Volume 1 Revision 6

Thinking in C++ 2nd ed Volume 1 Revision 6

Thinking in C++ 2nd ed Volume 1 Revision 6

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

You can’t just look at <strong>C++</strong> as a collection of features; some of the<br />

features make no sense <strong>in</strong> isolation. You can only use the sum of the<br />

parts if you are th<strong>in</strong>k<strong>in</strong>g about design, not simply cod<strong>in</strong>g. And to<br />

understand <strong>C++</strong> this way, you must understand the problems with<br />

C and with programm<strong>in</strong>g <strong>in</strong> general. This book discusses<br />

programm<strong>in</strong>g problems, why they are problems, and the approach<br />

<strong>C++</strong> has taken to solve such problems. Thus, the set of features I<br />

expla<strong>in</strong> <strong>in</strong> each chapter will be bas<strong>ed</strong> on the way that I see a<br />

particular type of problem be<strong>in</strong>g solv<strong>ed</strong> with the language. In this<br />

way I hope to move you, a little at a time, from understand<strong>in</strong>g C to<br />

the po<strong>in</strong>t where the <strong>C++</strong> m<strong>in</strong>dset becomes your native tongue.<br />

Throughout, I’ll be tak<strong>in</strong>g the attitude that you want to build a<br />

model <strong>in</strong> your head that allows you to understand the language all<br />

the way down to the bare metal; if you encounter a puzzle, you’ll be<br />

able to fe<strong>ed</strong> it to your model and d<strong>ed</strong>uce the answer. I will try to<br />

convey to you the <strong>in</strong>sights that have rearrang<strong>ed</strong> my bra<strong>in</strong> to make<br />

me start “th<strong>in</strong>k<strong>in</strong>g <strong>in</strong> <strong>C++</strong>.”<br />

What’s new <strong>in</strong> the second <strong>ed</strong>ition<br />

This book is a thorough rewrite of the first <strong>ed</strong>ition to reflect all the<br />

changes <strong>in</strong>troduc<strong>ed</strong> <strong>in</strong> <strong>C++</strong> by the f<strong>in</strong>alization of the ANSI/ISO <strong>C++</strong><br />

Standard. The entire text present <strong>in</strong> the first <strong>ed</strong>ition has been<br />

exam<strong>in</strong><strong>ed</strong> and rewritten, sometimes remov<strong>in</strong>g old examples, often<br />

chang<strong>in</strong>g exist<strong>in</strong>g examples and add<strong>in</strong>g new ones, and add<strong>in</strong>g many<br />

new exercises. Significant rearrangement and re-order<strong>in</strong>g of the<br />

material took place to reflect the availability of better tools and my<br />

improv<strong>ed</strong> understand<strong>in</strong>g of how people learn <strong>C++</strong>. A new chapter<br />

was add<strong>ed</strong> which is a rapid <strong>in</strong>troduction to the C concepts and basic<br />

<strong>C++</strong> features for those who haven’t been expos<strong>ed</strong>. The CD ROM<br />

bound <strong>in</strong>to the back of the book conta<strong>in</strong>s a sem<strong>in</strong>ar that is an even<br />

gentler <strong>in</strong>troduction to the C concepts necessary to understand <strong>C++</strong><br />

(or Java). It was creat<strong>ed</strong> by Chuck Allison for my company<br />

(M<strong>in</strong>dView, Inc.), and it’s call<strong>ed</strong> “<strong>Th<strong>in</strong>k<strong>in</strong>g</strong> <strong>in</strong> C: Foundations for<br />

Java and <strong>C++</strong>.” It <strong>in</strong>troduces you to the aspects of C that are<br />

necessary for you to move on to <strong>C++</strong> or Java (leav<strong>in</strong>g out the nasty<br />

bits that C programmers must deal with on a day-to-day basis but<br />

that the <strong>C++</strong> and Java languages steer you away from).<br />

22 <strong>Th<strong>in</strong>k<strong>in</strong>g</strong> <strong>in</strong> <strong>C++</strong> www.BruceEckel.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!