Skip to:Content
|
Bottom
Cover image for C++ from the ground up
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

Prefacep. 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++ Programp. 12
Handling Syntax Errorsp. 16
A Second Simple Programp. 17
A More Practical Examplep. 18
A New Data Typep. 19
A Quick Reviewp. 20
Functionsp. 20
Function Argumentsp. 22
Some Output Optionsp. 26
Two Simple Commandsp. 27
Blocks of Codep. 29
Semicolons and Positioningp. 30
Indentation Practicesp. 31
C++ Keywordsp. 31
Identifiers in C++p. 32
The Standard C++ Libraryp. 32
3 The Basic Data Typesp. 33
Declaration of Variablesp. 35
Some Type Modifiersp. 38
Literalsp. 41
Variable Initializationsp. 45
Operatorsp. 46
Expressionsp. 53
4 Program Control Statementsp. 57
The if Statementp. 58
The for Loopp. 62
The switch Statementp. 67
The while Loopp. 71
The do-while Loopp. 73
Using continuep. 74
Using break to Exit Loopsp. 75
Nested Loopsp. 76
Using the goto Statementp. 77
Putting Together the Piecesp. 78
5 Arrays and Stringsp. 81
One-Dimensional Arraysp. 82
Stringsp. 86
Some String Library Functionsp. 89
Two-Dimensional Arraysp. 94
Multidimensional Arraysp. 96
Array Initializationp. 96
Arrays of Stringsp. 101
6 Pointersp. 105
What Are Pointers?p. 106
The Pointer Operatorsp. 107
Pointer Expressionsp. 110
Pointers and Arraysp. 112
Pointers and String Literalsp. 117
A Comparison Examplep. 117
Arrays of Pointersp. 118
The Null Pointer Conventionp. 121
Multiple Indirectionp. 122
Problems with Pointersp. 124
7 Functions, Part One: The Fundamentalsp. 127
Scope Rules of Functionsp. 128
Passing Pointers and Arraysp. 136
Argc and argv: Arguments to main()p. 141
The return Statementp. 145
Function Prototypesp. 151
Headers: A Closer Lookp. 152
Recursionp. 153
8 Functions, Part Two: References, Overloading, and Default Argumentsp. 157
Two Approaches to Argument Passingp. 158
Reference Parametersp. 160
Function Overloadingp. 170
Default Function Argumentsp. 173
Function Overloading and Ambiguityp. 177
9 More Data Types and Operatorsp. 181
The const and volatile Qualifiersp. 182
Storage Class Specifiersp. 185
Enumerationsp. 193
Typedefp. 197
More Operatorsp. 197
Bitwise Operatorsp. 197
The ? Operatorp. 203
Compound Assignmentp. 205
The Comma Operatorp. 205
Multiple Assignmentsp. 206
Using sizeofp. 206
Dynamic Allocation Using new and deletep. 207
Precedence Summaryp. 213
10 Structures and Unionsp. 215
Structuresp. 216
Unionsp. 237
Using sizeof to Ensure Portabilityp. 243
Moving On to Object-Oriented Programmingp. 243
11 Introducing the Classp. 245
Class Fundamentalsp. 246
A Closer Look at Class Member Accessp. 250
Constructors and Destructorsp. 252
Classes and Structures Are Relatedp. 260
Unions and Classes Are Relatedp. 263
Inline Functionsp. 264
Arrays of Objectsp. 267
Pointers to Objectsp. 270
Object Referencesp. 272
12 A Closer Look at Classesp. 273
Friend Functionsp. 274
Overloading Constructorsp. 278
Dynamic Initializationp. 280
Assigning Objectsp. 282
Passing Objects to Functionsp. 283
Returning Objectsp. 288
Creating and Using a Copy Constructorp. 291
The this Keywordp. 297
13 Operator Overloadingp. 299
Operator Overloading Using Member Functionsp. 300
Nonmember Operator Functionsp. 309
A Closer Look at the Assignment Operatorp. 317
Overloading []p. 320
Overloading ()p. 324
Overloading Other Operatorsp. 325
Another Example of Operator Overloadingp. 325
14 Inheritancep. 331
Introducing Inheritancep. 332
Base Class Access Controlp. 335
Using protected Membersp. 337
Inheriting Multiple Base Classesp. 342
Constructors, Destructors, and Inheritancep. 343
Granting Accessp. 350
Virtual Base Classesp. 352
15 Virtual Functions and Polymorphismp. 357
Pointers to Derived Typesp. 358
Virtual Functionsp. 360
Early versus Late Bindingp. 372
16 Templatesp. 375
Generic Functionsp. 376
Generic Classesp. 384
17 Exception Handlingp. 395
Exception Handling Fundamentalsp. 396
Options for Exception Handlingp. 404
Handling Exceptions Thrown by newp. 409
Overloading new and deletep. 411
18 The C++ I/O Systemp. 417
Old VS Modern C++ I/Op. 418
C++ Streamsp. 418
The C++ Stream Classesp. 419
Overloading the I/O Operatorsp. 420
Formatted I/Op. 426
File I/Op. 435
More Binary I/O Functionsp. 444
Random Accessp. 446
Checking I/O Statusp. 448
Customized I/O and Filesp. 449
19 Run-Time Type ID and the Casting Operatorsp. 451
Run-Time Type Identification (RTTI)p. 452
The Casting Operatorsp. 462
20 Namespaces and Other Advanced Topicsp. 471
Namespacesp. 472
The std Namespacep. 478
Pointers to Functionsp. 480
Static Class Membersp. 484
Const Member Functions and mutablep. 486
Explicit Constructorsp. 488
The Member Initialization Syntaxp. 490
Using the asm Keywordp. 493
Linkage Specificationp. 493
The .* and [characters not reproducible]* Pointer-to-Member Operatorsp. 495
Creating Conversion Functionsp. 497
21 Introducing the Standard Template Libraryp. 499
An Overview of the STLp. 500
The Container Classesp. 502
Vectorsp. 504
Listsp. 514
Mapsp. 523
Algorithmsp. 529
The string Classp. 537
Final Thoughts on the STLp. 545
22 The C++ Preprocessorp. 547
#definep. 548
#errorp. 552
#includep. 552
Conditional Compilation Directivesp. 553
#linep. 558
#pragmap. 559
The # and ## Preprocessor Operatorsp. 559
Predefined Macro Namesp. 560
Final Thoughtsp. 561
A C-Based I/Op. 563
C I/O Uses Streamsp. 564
Understanding printf() and scanf()p. 565
The C File Systemp. 572
fseek() and Random-Access I/Op. 578
fprintf() and fscanf()p. 579
Erasing Filesp. 580
B Working with an Older C++ Compilerp. 581
C The .NET Managed Extensions to C++p. 585
The .NET Keyword Extensionsp. 586
Preprocessor Extensionsp. 588
The attribute Attributep. 589
Compiling Managed C++p. 589
Indexp. 591
Go to:Top of Page