C++ from the Beginning (International Computer Science Series) (2ND)

C++ from the Beginning (International Computer Science Series) (2ND)

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 632 p.
  • 言語 ENG,ENG
  • 商品コード 9780201721683
  • DDC分類 005.133

Full Description


C++ From the Beginning covers the whole of the C++ language from simple basics to advanced language constructs. The emphasis is on building programming skills via examples and exercises, integrating object-oriented programming with object-oriented design while teaching the basics of the language. It is a book with a dual purpose: to teach the fundamental principles of good programming, and to provide an accessible and direct introduction to C++. It is ideal for beginners taking their first programming course, and for programmers with some experience requiring a thorough introduction to the C++ language. Since the publication of the first edition of this book in 1997, the ISO standard for C++ has been approved. This new edition of the book covers the ISO standard. The standard incorporates a library of utility classes called the STL (Standard Template Library) not previously included in the core of C++. This book describes these new classes as well as advanced topics such as exceptions, streams, templates and function objects.

Table of Contents

Preface                                            v
Computers and programming 1 (28)
A computer's structure and operation 1 (4)
How you get the program into the computer 5 (9)
Programming languages 14 (5)
The process of developing programs 19 (3)
Algorithms 22 (2)
Top-down design 24 (5)
Exercises 26 (3)
The basics 29 (50)
Variables and reading/writing 29 (8)
Arithmetic expressions 37 (5)
if statements 42 (3)
Comparison operators and logical operators 45 (3)
while statements 48 (8)
for statements 56 (2)
Arrays 58 (7)
Sequences: vector and deque 65 (5)
General characteristics of sequences 66 (2)
Special characteristics of the classes 68 (2)
vector and deque
Errors in programs 70 (9)
Exercises 73 (6)
Characters and texts 79 (30)
Character codes and character literals 79 (3)
Single characters: reading and writing 82 (3)
The standard class string 85 (13)
Character arrays 98 (11)
Exercises 108(1)
Functions 109(38)
Functions that return a value 109(10)
Functions that do not return a value 119(3)
Declaration scope and visibility 122(3)
Function declarations 125(2)
Division of programs 127(4)
Reference parameters 131(7)
Parameters with default values 138(2)
Recursive functions 140(7)
Exercises 143(4)
Types 147(56)
Integer types 148(6)
Storing integers in a computer 148(2)
Predefined integer types 150(4)
Floating-point types 154(3)
Storing real numbers in a computer 154(2)
Predefined floating-point types 156(1)
The sizeof operator 157(1)
Pointers 157(24)
Primary memory addresses 157(1)
Pointer variables 158(4)
Pointers and arrays 162(5)
Pointers and text string 167(4)
Memory allocation 171(4)
Common errors 175(1)
Pointers and references: a comparison 176(2)
Pointers to functions 178(3)
Complicated declarations: typedef 181(2)
The type void 183(1)
Type conversions 184(2)
Automatic type conversions 184(1)
Explicit type conversions 185(1)
Enumeration types 186(5)
Tables 191(5)
Multidimensional arrays 191(3)
Tables with the help of vectors 194(2)
Pairs 196(7)
Exercises 199(4)
Object-oriented program development 203(12)
Basic concepts 203(2)
Object-oriented analysis 205(5)
Object-oriented design 210(1)
Object-oriented programming 211(4)
References 214(1)
Classes 215(38)
Class definitions 215(7)
Placement of classes 222(5)
Constructors 227(14)
Declarations of constructors 227(1)
Definitions of constructors 228(2)
Calling constructors 230(3)
The Copy constructor 233(5)
Type conversion constructors 238(3)
Destructors 241(2)
An object-oriented example 243(10)
Exercises 250(3)
More about classes 253(34)
Constant objects 253(2)
The pointer this 255(1)
Friends 256(3)
Operators 259(19)
Binary operators 261(5)
Predefined comparison operators 266(2)
Unary operators 268(2)
The assignment operator 270(2)
The indexing operator 272(1)
The function call operator 273(2)
Friend functions as operators 275(2)
Type conversion operators 277(1)
Static members 278(4)
Pointers to members 282(5)
Exercises 285(2)
Inheritance 287(56)
Derived classes 287(6)
Constructors, destructors and inheritance 293(5)
Access control 298(4)
Reusable code: an example 302(14)
Polymorphism and dynamic binding 316(9)
The operators typeid and dynamic_cast 325(3)
Virtual destructors 328(2)
Abstract classes 330(4)
Virtual operators 334(3)
Multiple inheritance 337(6)
Exercises 341(2)
Exceptions 343(24)
Generating exceptions 344(3)
Handling exceptions 347(10)
Defining our own exception classes: an 357(4)
example
Specification of exceptions 361(6)
Exercises 365(2)
Streams and files 367(52)
The class ios 368(5)
Reading streams 373(4)
Formatted input 373(3)
Unformatted input 376(1)
Output to streams 377(4)
Formatted output 377(4)
Unformatted output 381(1)
Connecting files to streams 381(9)
File names as arguments to main 390(4)
Direct access 394(7)
Storing heterogeneous objects in files 401(7)
Connecting string objects to streams 408(3)
Connecting text strings to streams 411(8)
Exercises 415(4)
Container classes and algorithms 419(50)
Iterators 420(8)
Running through containers with iterators 421(5)
Operations with iterators as parameters 426(1)
Iterators and streams 427(1)
Algorithms: general characteristics 428(3)
Function objects 431(13)
Using pointers to functions 432(4)
Using real function objects 436(3)
Using predefined function objects 439(5)
The standard class list 444(4)
Maps and sets 448(15)
The standard classes map and multimap 450(7)
The standard classes set and multiset 457(6)
Queues and stacks 463(6)
Exercises 468(1)
Dynamic data structures 469(42)
Linked lists: the basics 469(10)
Singly linked lists 469(6)
Doubly linked lists 475(4)
Linked lists: applications 479(12)
Stacks 479(3)
Queues 482(3)
Sets 485(6)
Iterators: implementations 491(5)
Trees 496(15)
Binary trees 497(5)
Binary search trees 502(2)
A tree class 504(4)
Exercises 508(3)
Templates 511(48)
Class templates 512(22)
Templates and instances 512(5)
Static members 517(2)
Friends and help classes 519(1)
Template parameters 520(2)
Property classes 522(5)
Generic standard classes 527(7)
Function templates 534(9)
Definitions and instances 534(4)
Generic standard functions: the algorithm 538(5)
library
Heterogeneous object collections 543(16)
The classical method 544(2)
The combination of inheritances and 546(2)
templates
An example: spreadsheets 548(9)
Exercises 557(2)
The final pieces of the puzzle 559(22)
Name spaces 559(7)
Definition of name spaces 560(3)
Using name spaces 563(2)
Name spaces and standard libraries 565(1)
Bit operators 566(1)
struct 567(2)
union 569(4)
Bit fields 573(2)
The do statement 575(1)
The switch statement 576(2)
The conditional operator 578(3)
Exercises 579(2)
Appendix A Reserved words and operators 581(2)
Appendix B LATIN_1 codes 583(2)
Appendix C Standard algorithms 585(34)
C.1 Search 585(6)
C.2 Compare, run through, count 591(2)
C.3 Copy and move elements 593(5)
C.4 Change and delete elements 598(4)
C.5 Generate new data 602(2)
C.6 Sort 604(3)
C.7 Operations on sorted containers 607(4)
C.8 Operations on sets 611(1)
C.9 Numerical algorithms 612(3)
C.10 Heap algorithms 615(4)
Index 619