Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
769
1
27
84
143
190
242
280
331
368
428
472
527
590
629
669
710
754
Detailed Contents
Features of the Book
Preface vii
Brief Contents xi
iv
1.7 Compilers
Introduction 1
1.1 Generation of Programming
Languages 2
1.2.1
1.2.2
1.2.3
1.2.4
2.4.1
2.4.2
2.4.3
2.4.4
10
Monolithic Programming 10
Procedural Programming 10
Structured Programming 11
Object Oriented Programming 12
1.3.6
1.3.7
1.3.8
1.3.9
Classes 14
Objects 14
Method and Message Passing 15
Inheritance 16
Polymorphism: Static Binding and
Dynamic Binding 17
Containership 17
Genericity 17
Delegation 18
Data Abstraction and Encapsulation
32
27
Introduction to C++ 27
2.1 History of C++ 27
2.2 Structure of a C++ Program 28
2.3 Writing the First C++ Program 28
2.4 Files used in a C++ Program 30
22
2.13 Constants
18
2.13.1
2.13.2
2.13.3
2.13.4
2.13.5
41
Integer Constant 41
Floating Point Constant 42
Character Constant 42
String Constant 42
Declaring Constants 42
52
52
43
xiii
Detailed Contents
2.15.2
2.15.3
2.15.4
2.15.5
2.15.6
2.15.7
2.15.8
2.15.9
2.15.10
2.15.11
Relational Operators 54
Equality Operators 55
Logical Operators 56
Unary Operators 57
Conditional Operators 59
Bitwise Operators 60
Assignment Operators 62
Comma Operator 63
Sizeof Operator 64
Operator Precedence and
Associativity 64
4.8
4.9
4.10
4.11
82
84
3.2.1
3.2.2
3.2.3
3.2.4
3.3
3.4
3.5
3.6
111
Introduction 143
4.1 Need for Functions 144
4.2 Using Functions 145
165
169
170
127
172
4. Functions
4.12.1
4.12.2
4.12.3
4.12.4
4.12.5
162
100
4.11.1
4.11.2
4.11.3
4.11.4
If Statement 85
If-Else Statement 86
If-Else-If Statement 89
Switch Case Statement 95
3.1.1
3.1.2
3.1.3
3.1.4
151
177
178
190
192
xiv
Detailed Contents
7. Pointers
194
Traversal 197
Insertion 203
Deletion 204
Merging 205
Searching the Array Elements
7.10
7.11
7.12
7.13
7.14
216
7.15
7.16
7.17
7.18
7.19
7.20
230
6. Strings
242
Introduction 242
6.1 Representation and Declaration of
Strings 242
6.1.1 Reading Strings 244
6.1.2 Writing Strings 245
6.2
6.3
6.4
6.5
Understanding Computers
Memory 280
Defining Pointers 281
Declaring Pointer Variables 282
Pointer Expressions and Pointer
Arithmetic 286
Null Pointers 288
Generic Pointers 289
Passing Arguments to Function Using
Pointers 289
Pointers and Arrays 290
Passing Array to Function 295
Differences Between Array Name and
Pointers 296
Pointers and Strings 298
Array of Pointers 300
Pointers and 2D Arrays 302
Pointers and 3D Arrays 306
Pointers to Functions 307
7.4
7.5
7.6
7.7
7.8
7.9
207
7.1
7.2
7.3
280
xv
Detailed Contents
331
Introduction 331
8.1 Structure Declaration 331
8.2 Typedef Declarations 332
8.3 Initialization of Structures 333
8.4 Accessing the Members of a
Structure 334
8.5 Copying and Comparing Structures
8.6 Nested Structures 337
8.7 Arrays of Structures 339
8.8 Structures and Functions 342
8.8.1
8.8.2
8.8.3
8.8.4
335
346
405
365
368
368
9.2
9.3
9.4
9.5
9.6
430
373
461
460
xvi
Detailed Contents
462
Introduction 472
11.1 Scope of Operator Overloading 472
11.2 Syntax for Operator Overloading 473
11.3 Operators that can and cannot be
Overloaded 474
11.4 Implementing Operator
Overloading 475
11.5 Overloading Unary Operators 475
11.5.1 Using a Member Function to Overload a
Unary Operator 475
11.5.2 Returning Object 476
11.5.3 Returning a Nameless Object 477
11.5.4 Using a Friend Function to Overload a
Unary Operator 477
11.5.5 Overloading the Prefix Increment and
Decrement Operators 478
11.5.6 Overloading the Post-Fix Increment and
Post-Fix Decrement Operators 479
Introduction
527
567
12.20
12.21
12.22
12.23
525
527
507
Case Study 5
528
577
578
xvii
Detailed Contents
590
Introduction 590
13.1 Streams in C++ 590
13.2 Classes for File Stream
Operations 591
13.3 Opening and Closing of Files
Introduction 669
15.1 Exception Handling
592
596
602
607
670
669
15.1.1
15.1.2
15.1.3
15.1.4
15.1.5
15.1.6
629
Introduction 629
14.1 Use of Templates 630
14.2 Function Templates 630
14.2.1 Templates Versus Macros 632
14.2.2 Guidelines for Using Template
Functions 632
Introduction 710
16.1 Containers 710
16.2 Algorithms 712
16.3 Iterators 714
16.4 Using Containers 715
16.4.1
16.4.2
16.4.3
16.4.4
Vector 715
Dequeue 716
Lists 717
Maps 719
725
Static_cast Operator
728
728
Const_cast 729
Reinterpret_cast 730
Dynamic_cast Operator 731
Typeid Operator 732
xviii
Detailed Contents
17.4.1
17.4.2
17.4.3
17.4.4
769
17.5.1
17.5.2
17.5.3
17.5.4
17.5.5
17.5.6
17.5.7
17.5.8
762