Cargando…

Practical C++ /

Annotation

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: McGregor, Robert W.
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Indianapolis, Ind. : Que, ©1999.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • What Experience Do You Need? 1
  • The History and Evolution of C++ 1
  • Formatting Conventions 4
  • Source Code on the Web: The Using C++ Web Site 4
  • How to Contact the Author 5
  • I C++ Basics
  • 1 Discovering C++ 9
  • Creating a C++ Program 10
  • Introducing Functions 15
  • Using C-Style and C++-Style Comments 20
  • Using Basic Input/Output Streams 25
  • 2 Exploring C++ Data Types, Variables, and Constants 35
  • Understanding C++ Data Types 36
  • Using Variables 45
  • Using Named Constants 49
  • Resolving the Scope of Variables and Constants 52
  • Understanding Declarations and Definitions 54
  • Casting Data Types 58
  • 3 Examining Expressions and Statements 61
  • Understanding Expressions 62
  • Using Statements 70
  • 4 Using Conditional Expressions and Selection Statements 77
  • Using Boolean Conditions and Expressions 78
  • Using Selection Statements 92
  • Using Enumerations 98
  • 5 Building Iteration Loops 101
  • Why Use Loops? 102
  • Examining Iteration Statements 103
  • Designing Loops 119
  • 6 Using Arrays 131
  • Why Use Arrays? 132
  • Understanding One-Dimensional Arrays 133
  • Understanding Two-Dimensional Arrays 144
  • Multi-Dimensional Arrays 156
  • 7 Creating and Using Functions 161
  • Why Use Functions? 162
  • Various Types of Functions 163
  • Components of a Function 170
  • Creating Your Own Functions 173
  • Using Command-Line Arguments 175
  • Using Variable-Argument Lists 185
  • Getting Modular with Functions 188
  • Specifying Function Linkage 191
  • II Beyond the Basics
  • 8 Overloading Functions 195
  • Why Use Function Overloading? 196
  • Types of Function Overloading 200
  • Examining the Internals of Function Overloading 208
  • 9 Using Structures and Unions 213
  • Creating New Data Types with Structures 214
  • Using Unions for Efficient Storage 236
  • 10 Using Pointers and References 245
  • Understanding Pointers 246
  • Understanding References 266
  • 11 Allocating Memory in C++ 273
  • Allocating Static Memory 274
  • Allocating Dynamic Memory 275
  • Using the new and delete Operators 276
  • Allocating Arrays 283
  • Creating Dynamic Arrays of Structures 286
  • Dealing with Allocation Errors 288
  • Creating Your Own new and delete Operators 292
  • 12 Understanding the Preprocessor 295
  • Introducing the Preprocessor 296
  • Understanding Preprocessing Phases 297
  • Understanding Preprocessor Directives 297
  • Exploring Macros 310
  • Using Preprocessor Operators 314
  • Considering Internationalization Issues 316
  • Examining Predefined Macros 319
  • 13 Creating and Using Function Pointers 323
  • How Can a Function Have a Pointer? 324
  • Some Reasons for Declaring Pointers to Functions 324
  • Declaring and Using Function Pointers 325
  • 14 Overloading Operators 343
  • Why Overload Operators? 344
  • Some Examples of Operator Overloading 354
  • 15 Bulletproofing Programs with Assertions and Exceptions 361
  • Devising Error Handling Strategies 362
  • Using Assertions 362
  • Handling Exceptions 371
  • 16 Exploring Namespaces 383
  • What Is a Namespace? 384
  • Declaring a Namespace 385
  • Getting Explicit Access to Namespaces 391
  • Using Namespace Aliases 397
  • Using Composite Namespaces 398
  • The Global Namespace 399
  • The Standard Namespace 400
  • 17 Analyzing the Mathematics 403
  • Examining Bases of Numeration Systems 405
  • Reviewing the Decimal Numeration System (Base 10) 405
  • Analyzing the Binary Numeration System (Base 2) 407
  • Analyzing the Octal Numeration System (Base 8) 409
  • A Base Conversion Program: CONVERT 411
  • Analyzing the Hexadecimal Numeration System (Base 16) 417
  • 18 Manipulating Bits 421
  • Working with Bits 422
  • Understanding Bit Fields 422
  • Using Bit Operators 427
  • Manipulating Bits in Signed and Unsigned Numbers 440
  • Exploring Bit-Shifting 440
  • 19 Compiling, Linking, and Debugging 447
  • Exploring the Compiler 448
  • Resolving Compiler Errors 449
  • Exploring the Linker 451
  • Resolving Linker Errors 451
  • Automating Builds Using Make Files 453
  • Finding and Fixing Buggy Code 454
  • Strategies for Testing and Debugging 459
  • III Object-Oriented Programming
  • 20 Introducing Object-Oriented Programming 469
  • Fundamentals of Object-Oriented Programming 470
  • Understanding Objects and Classes in C++ 480
  • Examining the Benefits of Code Reuse 483
  • 21 Understanding C++ Classes 485
  • Creating C++ Classes 486
  • Specifying Access Control 489
  • Defining Data Members 492
  • Understanding the this Pointer 496
  • Creating Copy Constructors 500
  • Creating Member Operators 504
  • Defining Member Functions 505
  • Using Pointer-to-Member Operator Expressions 508
  • Designing and Implementing a Rectangle Class 511
  • 22 Implementing Class Inheritance 521
  • Understanding Base and Derived Classes 522
  • Creating Class Hierarchies 523
  • Implementing a Class Hierarchy 531
  • Using Friend Functions and Classes 536
  • Creating Class Libraries 542
  • 23 Understanding Polymorphism 545
  • What Is Polymorphism? 546
  • Getting Virtual 546
  • Using Pointers to Classes in a Hierarchy 552
  • Resolving Class Slicing 562
  • Using Virtual Destructors 564
  • 24 Implementing Dynamic Storage in C++ 569
  • Container Classes 570
  • Creating Dynamic Arrays 570
  • Creating Linked Lists 589
  • 25 Designing and Developing Object-Oriented Programs 613
  • Problem Solving Techniques 614
  • Exploring the Development Process 614
  • Using Modular Source Files 621
  • Devising Class Methods 626
  • Testing and Integrating Modules 628
  • Reusing Code 630
  • 26 Using Templates 631
  • Conceptualizing Templates 632
  • Creating a Basic Class Template 638
  • Creating a More Complex Class Template 639
  • Converting Existing Classes into Class Templates 643
  • Creating a Generic Linked List Class 643
  • 27 Using Dynamic Casting and Runtime Type Identification 665
  • Getting and Using Runtime Type Information 666
  • IV Using the Standard C++ Library
  • 28 Introducing the Standard C++ Library 681
  • An Overview of the Standard C++ Library 682
  • Identifying the Components of the Standard C++ Library 685
  • Identifying STL Components 692
  • 29 Using Iterators and Containers 697
  • Understanding Iterators 698
  • Understanding Containers 714
  • 30 Using Strings 739
  • Characters and Standard Strings 740
  • Investigating the basic_string Class 743
  • 31 Working with Numercis 767
  • Identifying Numeric Headers 768
  • Using Standard Math Functions 768
  • Generating Random Numbers 770
  • Working with Complex Numbers 773
  • Introducing valarrays 774
  • Exploring Numeric Algorithms 776
  • 32 Working with Files and Streams 787
  • Working with Streams 788
  • Identifying Stream Types 788
  • Using Stream Manipulators 801
  • Using File Streams 805
  • 33 Examining Algorithms 819
  • Generic Algorithms 820
  • Exploring the Nonmodifying Sequence Algorithms 821
  • Exploring the Modifying Sequence Algorithms 827
  • Exploring the Sorted Sequence Algorithms 837
  • Exploring the Heap Operation Algorithms 846
  • Exploring the Comparison Algorithms 848
  • Exploring the Permutation Algorithms 850.