Monday 7 March 2011

C++ in A Nutshell



C++ in A Nutshell
| 2003-05-01 00:00:00 | | 808 | C++


C++ in a Nutshell packs an enormous amount of information on C++ (and the many libraries used with it) in an indispensable quick reference for those who live in a deadline-driven world and need the facts but not the frills. The book's language reference is organized first by topic, followed by an alphabetical reference to the language's keywords, complete with syntax summaries and pointers to the topic references. The library reference is organized by header file, and each library chapter and class declaration presents the classes and types in alphabetical order for easy lookup. Cross-references link related methods, classes, and other key features. This is an ideal resource for students as well as professional programmers. When you're programming, you need answers to questions about language syntax, or parameters required by library routines quickly. C++ in a Nutshell is a concise desktop reference that answers these questions, putting the full power of this flexible, adaptable (but somewhat difficult to master) language at every C++ programmer's fingertips.

User review
Research and references
I would ask my old engineering mentor if it is ok to bring all my books to the job. His answer: `All engineers do research!` Thank god for the Nutshell books. This series [Nutshell] is not for language learners, although I still learn new things from these books. Like most object-oriented languages, C++ is a huge language with many constructs. The `C++ In A Nutshell` book documents nearly all the basic functionality and some esoterica.


Since all engineers do research, we have to have research materials. The Nutshell series does just that, it documents what is, without throwing-out to much design phylosophy. There are other books better suited for this purpose.


DC

User review
Overcomplicated
Hi,

I'm a recent graduate B.Sc CS and used this book extensively for a month+ as to prepare for a c++ job interviews.


Unfortunately I can't say I loved this book. I found the examples to be overcomplicated by irrelevant information and language to be ambiguous at the times.


As an example, from page 160 (classes/ covariant return types):

`In a derived class, a covariant return type is a pointer or reference to a class type that derives from the return type used in the base class` ?!


Code examples are contaminated by the irrelevant programming techniques and irrelevant code. Page 158, `declaring and using virtual functions`, the code example extends over two pages. In it, author uses concepts of templates, complicated operators overloading, constructor and destructor, pure virtual functions (its different topic in the book, much later) as well as a very complicated programming code. And all of this extra information used to explain a rather simple virtual functions.


If the reader is not very familiar with some concepts of programming language, reader might face a difficulty to understand the topic illustrated, as it would be polluted with much unrelated code technique.


I wouldn't recommend this book for the beginners, and would proceed with caution if you are an intermediate programmer. This is a great start but author need to maintain focus on the particular topic and not to make it more complicated then it's already is. After all it's a reference book and not the collection of the brain teasers.



User review
Best reference for the core language with plenty of examples
Many implementations of C++ extend the language and standard library. Except for brief mentions of language and library extensions in the appendixes, this book covers only the standard. The standard library is large, but it omits much that is common in computing today such as concurrency, network protocols, database access, graphics, and windowing. However, Appendix B contains some information about nonstandard libraries that provide additional functionality.


This book is a reference, not a tutorial, thus those unfamiliar with C++ might find portions of this book difficult to understand. Although each portion of the book contains some advice on idioms and the proper use of certain language constructs, the main focus is on the reference material. This book is divided into two interleaved sections that cover the language and the library, and a couple of appendixes. Roughly speaking, the language is the part of C++ that does not require any additional #include headers or files. The library is the part of C++ that is declared in the standard headers.


Chapter 1 through Chapter 7, Chapter 11, and Chapter 12 cover the language itself. The first seven chapters form the main language reference, organized by topic. It is customary for a programming reference to contain a formal grammar, and this book does so in Chapter 12, which is organized alphabetically by keyword with some additional entries for major syntactic categories, such as expressions. Chapter 11 is a reference for the preprocessor. Chapter 13 is the library reference, organized alphabetically by header. Chapters 8 through 10 present an overview of the library and introduce the topics that span individual headers. A detailed accounting of each chapter follows:


Chapter 1. Language Basics - describes the basic rules for the C++ language.

1.1. Compilation Steps

1.2. Tokens

1.3. Comments

1.4. Character Sets

1.5. Alternative Tokens

1.6. Trigraphs


Chapter 2. Declarations - describes how objects, types, and namespaces are declared and how names are looked up.

2.1. Declarations and Definitions

2.2. Scope

2.3. Name Lookup

2.4. Linkage

2.5. Type Declarations

2.6. Object Declarations

2.7. Namespaces


Chapter 3. Expressions - describes operators, precedence, and type casts.

3.1. Lvalues and Rvalues

3.2. Type Conversions

3.3. Constant Expressions

3.4. Expression Evaluation

3.5. Expression Rules


Chapter 4. Statements - describes all the C++ statements.

4.1. Expression Statements

4.2. Declarations

4.3. Compound Statements

4.4. Selections

4.5. Loops

4.6. Control Statements

4.7. Handling Exceptions


Chapter 5. Functions - describes function declarations and definitions, overload resolution, argument passing, and related topics.

5.1. Function Declarations

5.2. Function Definitions

5.3. Function Overloading

5.4. Operator Overloading

5.5. The main Function


Chapter 6. Classes - describes classes, unions, structures, members, virtual functions, inheritance, accessibility, and multiple inheritance.

6.1. Class Definitions

6.2. Data Members

6.3. Member Functions

6.4. Inheritance

6.5. Access Specifiers

6.6. Friends

6.7. Nested Types


Chapter 7. Templates - describes class and function template declarations, definitions, instantiations, specializations, and how templates are used.

7.1. Overview of Templates

7.2. Template Declarations

7.3. Function Templates

7.4. Class Templates

7.5. Specialization

7.6. Partial Specialization

7.7. Instantiation

7.8. Name Lookup

7.9. Tricks with Templates

7.10. Compiling Templates


Chapter 8. Standard Library - introduces the standard library and discusses some overarching topics, such as traits and allocators.

8.1. Overview of the Standard Library

8.2. C Library Wrappers

8.3. Wide and Multibyte Characters

8.4. Traits and Policies

8.5. Allocators

8.6. Numerics


Chapter 9. Input and Output - introduces the I/O portion of the standard library. Topics include formatted and unformatted I/O, stream buffers, and manipulators.

9.1. Introduction to I/O Streams

9.2. Text I/O

9.3. Binary I/O

9.4. Stream Buffers

9.5. Manipulators

9.6. Errors and Exceptions


Chapter 10. Containers, Iterators, and Algorithms - introduces the suite of container class templates, their iterators, and generic algorithms. This is the portion of the library that has traditionally been called the Standard Template Library (STL).

10.1. Containers

10.2. Iterators

10.3. Algorithms


Chapter 11. Preprocessor Reference - an alphabetical reference for the preprocessor, which is part of the language, but with a distinct set of syntactic and semantic rules.


Chapter 12. Language Reference - an alphabetical reference for the language and grammar. Backus-Naur Form (BNF) syntax descriptions are given for each keyword and other language elements, with pointers to the first seven chapters for the main reference material.


Chapter 13. Library Reference - a reference for the entire standard library, organized alphabetically by header, and alphabetically by name within each header section.


Appendix A. Compiler Extension - describes ways that some compilers extend the language: to satisfy customer need, to meet platform-specific requirements, and so on.


Appendix B. Projects - describes a few interesting, open source C++ projects. You can find information about additional projects on the book's web site.


The book illustrates the descriptions and definitions it covers with plenty of examples - some quite short, and then some longer ones as you get further into the book. If you need a good desk reference on C++, this is definitely the one to buy and keep by your side.

User review
Great reference book
This is a great reference book. You definitely need to know something about c++ to get the full benefit of it. I would recommend it.

User review
Excellent reference
I always like O'Reilly books and are usually what I purchase. The `In A Nutshell` may be misleading to some. Just think of it as `C++ A Language & Library Reference.` If you are a beginner looking for a how to, this isn't the one for you. `Thinking in C++` by Bruce Eckel (great book), or `Practical C++ Programming` would be the one a beginner would want. However, when you are ready to explore the inter-details about what C++ classes provides, this would be a good one to add to your collection. The first half describes C++ in general, while the last half details the language reference. I like how the reference is structured, grouped by the easy to find header declaration at the bottom of the page. Quickly finding what you need is a great feature here. You can only do so much `std::cout

Download this book!

Free Ebooks Download

No comments:

Post a Comment