Title:
C++ from the ground up
Personal Author:
Publication Information:
Berkeley : Osborne/McGraw-Hill, 1994
ISBN:
9780078819698
Available:*
Library | Item Barcode | Call Number | Material Type | Item Category 1 | Status |
---|---|---|---|---|---|
Searching... | 30000003025982 | QA76.73.C153 S344 1994 | Open Access Book | Book | Searching... |
On Order
Summary
Author Notes
Herbert Schildt is the world's leading programming author. He is an authority on the C, C++, Java, and C# programming languages, and is a master Windows programmer. He was a member of the ANSI/ISO committee that standardized C++
Table of Contents
Preface | p. xvii |
1 The Story of C++ | p. 1 |
The Origins of C++ | p. 2 |
The Evolution of C++ | p. 6 |
What Is Object-Oriented Programming? | p. 6 |
2 An Overview of C++ | p. 11 |
Your First C++ Program | p. 12 |
Handling Syntax Errors | p. 16 |
A Second Simple Program | p. 17 |
A More Practical Example | p. 18 |
A New Data Type | p. 19 |
A Quick Review | p. 20 |
Functions | p. 20 |
Function Arguments | p. 22 |
Some Output Options | p. 26 |
Two Simple Commands | p. 27 |
Blocks of Code | p. 29 |
Semicolons and Positioning | p. 30 |
Indentation Practices | p. 31 |
C++ Keywords | p. 31 |
Identifiers in C++ | p. 32 |
The Standard C++ Library | p. 32 |
3 The Basic Data Types | p. 33 |
Declaration of Variables | p. 35 |
Some Type Modifiers | p. 38 |
Literals | p. 41 |
Variable Initializations | p. 45 |
Operators | p. 46 |
Expressions | p. 53 |
4 Program Control Statements | p. 57 |
The if Statement | p. 58 |
The for Loop | p. 62 |
The switch Statement | p. 67 |
The while Loop | p. 71 |
The do-while Loop | p. 73 |
Using continue | p. 74 |
Using break to Exit Loops | p. 75 |
Nested Loops | p. 76 |
Using the goto Statement | p. 77 |
Putting Together the Pieces | p. 78 |
5 Arrays and Strings | p. 81 |
One-Dimensional Arrays | p. 82 |
Strings | p. 86 |
Some String Library Functions | p. 89 |
Two-Dimensional Arrays | p. 94 |
Multidimensional Arrays | p. 96 |
Array Initialization | p. 96 |
Arrays of Strings | p. 101 |
6 Pointers | p. 105 |
What Are Pointers? | p. 106 |
The Pointer Operators | p. 107 |
Pointer Expressions | p. 110 |
Pointers and Arrays | p. 112 |
Pointers and String Literals | p. 117 |
A Comparison Example | p. 117 |
Arrays of Pointers | p. 118 |
The Null Pointer Convention | p. 121 |
Multiple Indirection | p. 122 |
Problems with Pointers | p. 124 |
7 Functions, Part One: The Fundamentals | p. 127 |
Scope Rules of Functions | p. 128 |
Passing Pointers and Arrays | p. 136 |
Argc and argv: Arguments to main() | p. 141 |
The return Statement | p. 145 |
Function Prototypes | p. 151 |
Headers: A Closer Look | p. 152 |
Recursion | p. 153 |
8 Functions, Part Two: References, Overloading, and Default Arguments | p. 157 |
Two Approaches to Argument Passing | p. 158 |
Reference Parameters | p. 160 |
Function Overloading | p. 170 |
Default Function Arguments | p. 173 |
Function Overloading and Ambiguity | p. 177 |
9 More Data Types and Operators | p. 181 |
The const and volatile Qualifiers | p. 182 |
Storage Class Specifiers | p. 185 |
Enumerations | p. 193 |
Typedef | p. 197 |
More Operators | p. 197 |
Bitwise Operators | p. 197 |
The ? Operator | p. 203 |
Compound Assignment | p. 205 |
The Comma Operator | p. 205 |
Multiple Assignments | p. 206 |
Using sizeof | p. 206 |
Dynamic Allocation Using new and delete | p. 207 |
Precedence Summary | p. 213 |
10 Structures and Unions | p. 215 |
Structures | p. 216 |
Unions | p. 237 |
Using sizeof to Ensure Portability | p. 243 |
Moving On to Object-Oriented Programming | p. 243 |
11 Introducing the Class | p. 245 |
Class Fundamentals | p. 246 |
A Closer Look at Class Member Access | p. 250 |
Constructors and Destructors | p. 252 |
Classes and Structures Are Related | p. 260 |
Unions and Classes Are Related | p. 263 |
Inline Functions | p. 264 |
Arrays of Objects | p. 267 |
Pointers to Objects | p. 270 |
Object References | p. 272 |
12 A Closer Look at Classes | p. 273 |
Friend Functions | p. 274 |
Overloading Constructors | p. 278 |
Dynamic Initialization | p. 280 |
Assigning Objects | p. 282 |
Passing Objects to Functions | p. 283 |
Returning Objects | p. 288 |
Creating and Using a Copy Constructor | p. 291 |
The this Keyword | p. 297 |
13 Operator Overloading | p. 299 |
Operator Overloading Using Member Functions | p. 300 |
Nonmember Operator Functions | p. 309 |
A Closer Look at the Assignment Operator | p. 317 |
Overloading [] | p. 320 |
Overloading () | p. 324 |
Overloading Other Operators | p. 325 |
Another Example of Operator Overloading | p. 325 |
14 Inheritance | p. 331 |
Introducing Inheritance | p. 332 |
Base Class Access Control | p. 335 |
Using protected Members | p. 337 |
Inheriting Multiple Base Classes | p. 342 |
Constructors, Destructors, and Inheritance | p. 343 |
Granting Access | p. 350 |
Virtual Base Classes | p. 352 |
15 Virtual Functions and Polymorphism | p. 357 |
Pointers to Derived Types | p. 358 |
Virtual Functions | p. 360 |
Early versus Late Binding | p. 372 |
16 Templates | p. 375 |
Generic Functions | p. 376 |
Generic Classes | p. 384 |
17 Exception Handling | p. 395 |
Exception Handling Fundamentals | p. 396 |
Options for Exception Handling | p. 404 |
Handling Exceptions Thrown by new | p. 409 |
Overloading new and delete | p. 411 |
18 The C++ I/O System | p. 417 |
Old VS Modern C++ I/O | p. 418 |
C++ Streams | p. 418 |
The C++ Stream Classes | p. 419 |
Overloading the I/O Operators | p. 420 |
Formatted I/O | p. 426 |
File I/O | p. 435 |
More Binary I/O Functions | p. 444 |
Random Access | p. 446 |
Checking I/O Status | p. 448 |
Customized I/O and Files | p. 449 |
19 Run-Time Type ID and the Casting Operators | p. 451 |
Run-Time Type Identification (RTTI) | p. 452 |
The Casting Operators | p. 462 |
20 Namespaces and Other Advanced Topics | p. 471 |
Namespaces | p. 472 |
The std Namespace | p. 478 |
Pointers to Functions | p. 480 |
Static Class Members | p. 484 |
Const Member Functions and mutable | p. 486 |
Explicit Constructors | p. 488 |
The Member Initialization Syntax | p. 490 |
Using the asm Keyword | p. 493 |
Linkage Specification | p. 493 |
The .* and [characters not reproducible]* Pointer-to-Member Operators | p. 495 |
Creating Conversion Functions | p. 497 |
21 Introducing the Standard Template Library | p. 499 |
An Overview of the STL | p. 500 |
The Container Classes | p. 502 |
Vectors | p. 504 |
Lists | p. 514 |
Maps | p. 523 |
Algorithms | p. 529 |
The string Class | p. 537 |
Final Thoughts on the STL | p. 545 |
22 The C++ Preprocessor | p. 547 |
#define | p. 548 |
#error | p. 552 |
#include | p. 552 |
Conditional Compilation Directives | p. 553 |
#line | p. 558 |
#pragma | p. 559 |
The # and ## Preprocessor Operators | p. 559 |
Predefined Macro Names | p. 560 |
Final Thoughts | p. 561 |
A C-Based I/O | p. 563 |
C I/O Uses Streams | p. 564 |
Understanding printf() and scanf() | p. 565 |
The C File System | p. 572 |
fseek() and Random-Access I/O | p. 578 |
fprintf() and fscanf() | p. 579 |
Erasing Files | p. 580 |
B Working with an Older C++ Compiler | p. 581 |
C The .NET Managed Extensions to C++ | p. 585 |
The .NET Keyword Extensions | p. 586 |
Preprocessor Extensions | p. 588 |
The attribute Attribute | p. 589 |
Compiling Managed C++ | p. 589 |
Index | p. 591 |