معرفی کتاب «C++ from the ground up [learn C++ from the master ; covers the international standard for C++ ; teaches the entire C++ language, from the basics to advanced features ; packed with insider tips and techniques, and hundreds of examples ; includes the standa» نوشتهٔ Herbert Schildt، منتشرشده توسط نشر McGraw-Hill Osborne Media در سال 2003. این کتاب در 46 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است.
Many of the reviews of this book mention the background of the reviewer. If you are considering learning C++ from this book, I suggest you consider carefully the reviews by those with a background close to yours. Pay less attention to those with a substantially different background. But. read this review because I will try to offer several different perspectives. I earned my living from 1960 to my recent retirement programming digital computers of many kinds, in many languages, and for many applications, including about 15 years using C. I used this text in a just finished C++ course as part of my "mind rot delay program." I knew some things about C++, but had not used it. The instructor has taught the course for many years, and I believe has used the same text for several years. It seems to have passed the test of time for that environment. The second sentence of the preface states "No previous programming experience is required." The school requires either a two semester sequence of C programming, or a one semester C course for those with previous programming experience. The instructor said those without a solid background in C would be lost. I do not know anything about the other students in the class, but almost half were gone by the final night. One of the good things about this book is the large number of complete sample programs. These illustrate and demonstrate features of the language. You don't even have to type them in; you can get them from the publisher's web site. One of the bad things about this book is the large number of complete sample programs. Often the portion of interest is two or three lines out of a page or two. The book is much larger than it could be. There are a few questions in the text, but not many. There are no problem sets or review questions to test your understanding. At the end of a few chapters there is a suggestion to review certain topics. There are frequent suggestions to play with a program, make changes and understand what happens. Almost all the provided programs are complete in one file. Real C++ applications are usually file intensive, even more so than applications written in C. Even toy homework problems from my class often involved five or seven files. The book is remarkably complete for a work aimed at novices. There are omissions, but most are minor. Some reviewers, and my instructor, said the coverage of member initialization lists is particularly weak. The Standard Template Library (STL) is one of the newer features of the language. It is covered in the longest chapter of the book, 46 pages. Other reviewers have complained that the coverage is scant. They are right. It is scant. The chapter is called "Introducing the Standard Template Library." The book explains a few of the container classes and a few of the operations you can do on them. The explanations are at a level similar to the rest of the book. It is enough to get you started. Similar operations on other container classes have similar names. There are several lists of function names with very brief descriptions. For an introduction, it is adequite. My instructor said it would take more than a semester to cover the entire STL. I think that would be a very dull class. Look through the STL from time to time; perhaps you will notice something that seems useful. Then learn the immediately useful parts. Here is a tip that I learned the hard way. The functions listed in the ALGORITHMS section of the STL are not member functions. You can tell if you study the sample program closely enough, but it is not clear from the main text. The preface promises you (the novice) will be an accomplished C++ programmer when you finish the book. I disagree. You may know a lot about details of the language, but the book will not help you design a solution to a problem. Not recommended for a novice. If you have some experience programming in some language, the book could be useful. Read it while you rework the problems from your old text, using C++. Warning: I'm not a teacher; this is just my suspicion. The current edition is the Third Edition. Some of the reviews here seem to be of an earlier edition. The Third Edition was published in 2003. That is long ago for many computer books, but the C++ standard has not changed since 1998, except for some corrections in 2003. Most of the changes for the next version of the standard are expected to apply only to the library. C++ from the Ground Up......Page 2 About the Author......Page 3 Contents......Page 6 Preface......Page 18 For Further Study......Page 20 1 The Story of C++......Page 22 The Creation of C......Page 23 Understanding the Need for C++......Page 25 C++ Is Born......Page 26 What Is Object- Oriented Programming?......Page 27 Polymorphism......Page 28 How C++ Relates to Java and C#......Page 29 2 An Overview of C++......Page 32 Entering the Program......Page 33 Compiling the Program......Page 34 A Line- by- Line Explanation......Page 35 Handling Syntax Errors......Page 37 A Second Simple Program......Page 38 A More Practical Example......Page 39 A New Data Type......Page 40 Functions......Page 41 A Program with Two Functions......Page 42 Function Arguments......Page 43 Functions Returning Values......Page 45 The main( ) Function......Page 46 Some Output Options......Page 47 The if Statement......Page 48 The for Loop......Page 49 Blocks of Code......Page 50 Semicolons and Positioning......Page 51 C++ Keywords......Page 52 The Standard C++ Library......Page 53 3 The Basic Data Types......Page 54 Local Variables......Page 56 Formal Parameters......Page 57 Global Variables......Page 58 Some Type Modifiers......Page 59 Literals......Page 62 String Literals......Page 64 Character Escape Sequences......Page 65 Variable Initializations......Page 66 Arithmetic Operators......Page 67 Increment and Decrement......Page 69 How C++ Got Its Name......Page 70 Relational and Logical Operators......Page 71 Converting to and from bool......Page 74 Casts......Page 75 Spacing and Parentheses......Page 76 4 Program Control Statements......Page 78 The if Statement......Page 79 The Conditional Expression......Page 80 Nested ifs......Page 81 The if- else- if Ladder......Page 82 The for Loop......Page 83 Some Variations on the for Loop......Page 85 The Infinite Loop......Page 87 The switch Statement......Page 88 The while Loop......Page 92 The do- while Loop......Page 94 Using continue......Page 95 Using break to Exit Loops......Page 96 Nested Loops......Page 97 Using the goto Statement......Page 98 Putting Together the Pieces......Page 99 5 Arrays and Strings......Page 102 One- Dimensional Arrays......Page 103 No Bounds Checking......Page 105 Sorting an Array......Page 106 Strings......Page 107 Reading a String from the Keyboard......Page 108 strcat......Page 110 strcmp......Page 111 strlen......Page 112 Using the Null Terminator......Page 114 Two- Dimensional Arrays......Page 115 Array Initialization......Page 117 Unsized Array Initializations......Page 121 Arrays of Strings......Page 122 An Example Using String Arrays......Page 123 6 Pointers......Page 126 What Are Pointers?......Page 127 The Pointer Operators......Page 128 The Base Type Is Important......Page 129 Pointer Expressions......Page 131 Pointer Arithmetic......Page 132 Pointers and Arrays......Page 133 Indexing a Pointer......Page 136 Are Pointers and Arrays Interchangeable?......Page 137 A Comparison Example......Page 138 Arrays of Pointers......Page 139 The Null Pointer Convention......Page 142 Pointers and 16- bit Environments......Page 143 Invalid Pointer Comparisons......Page 145 Forgetting to Reset a Pointer......Page 146 7 Functions, Part One: The Fundamentals......Page 148 Local Variables......Page 149 Global Variables......Page 155 Calling Functions with Pointers......Page 157 Calling Functions with Arrays......Page 158 Passing Strings......Page 161 argc and argv: Arguments to main( )......Page 162 Passing Numeric Command Line Arguments......Page 165 The return Statement......Page 166 Returning from a Function......Page 167 Returning Values......Page 168 Functions That Return Pointers......Page 170 Function Prototypes......Page 172 Headers: A Closer Look......Page 173 Recursion......Page 174 8 Functions, Part Two: References, Overloading, and Default Arguments......Page 178 How C++ Passes Arguments......Page 179 Using a Pointer to Create a Call- by- Reference......Page 180 Reference Parameters......Page 181 Declaring Reference Parameters 8......Page 184 Returning References......Page 185 Creating a Bounded Array......Page 188 Independent References......Page 189 A Few Restrictions When Using References......Page 190 Function Overloading......Page 191 Default Function Arguments......Page 194 Default Arguments versus Overloading......Page 196 Function Overloading and Ambiguity......Page 198 9 More Data Types and Operators......Page 202 const......Page 203 volatile......Page 205 auto......Page 206 extern......Page 207 static Variables......Page 208 Register Variables......Page 212 The Origins of the register Modifier......Page 213 Enumerations......Page 214 Bitwise Operators......Page 218 AND, OR, XOR, and NOT......Page 219 The Shift Operators......Page 223 The ? Operator......Page 224 The Comma Operator......Page 226 Using sizeof......Page 227 Dynamic Allocation Using new and delete......Page 228 Allocating Arrays......Page 231 C¡ ̄s Approach to Dynamic Allocation:malloc( ) and free( )......Page 232 Precedence Summary......Page 234 10 Structures and Unions......Page 236 Structures......Page 237 Accessing Structure Members......Page 239 A Simple Inventory Example......Page 240 Passing Structures to Functions......Page 247 Assigning Structures......Page 248 Pointers to Structures and the Arrow Operator......Page 249 References to Structures......Page 253 Arrays and Structures Within Structures......Page 254 C Structure Versus C++ Structures......Page 255 Bit- Fields......Page 256 Unions......Page 258 Anonymous Unions......Page 263 Moving On to Object- Oriented Programming......Page 264 11 Introducing the Class......Page 266 Class Fundamentals......Page 267 A Closer Look at Class Member Access......Page 271 Constructors and Destructors......Page 273 Parameterized Constructors......Page 276 An Initialization Alternative......Page 280 Classes and Structures Are Related......Page 281 Structures versus Classes......Page 283 Unions and Classes Are Related......Page 284 Inline Functions......Page 285 Creating Inline Functions Inside a Class......Page 286 Arrays of Objects......Page 288 Initializing Object Arrays......Page 289 Pointers to Objects......Page 291 Object References......Page 293 12 A Closer Look at Classes......Page 294 Friend Functions......Page 295 Overloading Constructors......Page 299 Applying Dynamic Initialization to Constructors......Page 301 Assigning Objects......Page 303 Passing Objects to Functions......Page 304 Constructors, Destructors, and Passing Objects......Page 305 A Potential Problem When Passing Objects......Page 306 Returning Objects......Page 309 A Potential Problem When Returning Objects......Page 310 Creating and Using a Copy Constructor......Page 312 Copy Constructors and Parameters......Page 313 Copy Constructors and Initializations......Page 315 Using Copy Constructors When an Object Is Returned......Page 316 Copy Constructors ¡a Is There a Simpler Way?......Page 317 The this Keyword......Page 318 13 Operator Overloading......Page 320 Operator Overloading Using Member Functions......Page 321 Using Member Functions to Overload Unary Operators......Page 324 Operator Overloading Tips and Restrictions......Page 329 Order Matters......Page 330 Using a Friend to Overload a Unary Operator......Page 334 Overloading the Relational and Logical Operators......Page 337 A Closer Look at the Assignment Operator......Page 338 Overloading [ ]......Page 341 Overloading ( )......Page 345 Another Example of Operator Overloading......Page 346 14 Inheritance......Page 352 Introducing Inheritance......Page 353 Base Class Access Control......Page 356 Using protected Members......Page 358 Using protected for Inheritance of a Base Class......Page 361 Inheriting Multiple Base Classes......Page 363 When Constructors and Destructors Are Executed......Page 364 Passing Parameters to Base Class Constructors......Page 367 Granting Access......Page 371 Virtual Base Classes......Page 373 15 Virtual Functions and Polymorphism......Page 378 Pointers to Derived Types......Page 379 Virtual Functions......Page 381 Virtual Functions Are Inherited......Page 384 Why Virtual Functions?......Page 386 A Simple Application of Virtual Functions......Page 387 Pure Virtual Functions and Abstract Classes......Page 391 Early versus Late Binding......Page 393 Polymorphism and the Purist......Page 394 16 Templates......Page 396 Generic Functions......Page 397 A Function with Two Generic Types......Page 399 Explicitly Overloading a Generic Function......Page 400 Overloading a Function Template......Page 402 Using Standard Parameters with Template Functions......Page 403 Creating a Generic abs( ) Function......Page 404 Generic Classes......Page 405 An Example with Two Generic Data Types......Page 408 Creating a Generic Array Class......Page 409 Using Non- Type Arguments with Generic Classes......Page 410 Using Default Arguments with Template Classes......Page 412 Explicit Class Specializations......Page 414 17 Exception Handling......Page 416 Exception Handling Fundamentals......Page 417 exit( ) and abort( )......Page 419 Catching Class Types......Page 422 Using Multiple catch Statements......Page 423 Catching All Exceptions......Page 425 Restricting Exceptions Thrown by a Function......Page 427 Rethrowing an Exception......Page 429 Handling Exceptions Thrown by new......Page 430 The nothrow Alternative......Page 431 Overloading new and delete......Page 432 Overloading the nothrow Version of new......Page 436 18 The C++ I/O System......Page 438 C++ Streams......Page 439 The C++ Stream Classes......Page 440 Overloading the I/ O Operators......Page 441 Creating Inserters......Page 442 Using Friend Functions to Overload Inserters......Page 444 Overloading Extractors......Page 445 Formatting with the ios Member Functions......Page 447 Using I/ O Manipulators......Page 452 Creating Your Own Manipulator Functions......Page 454 Opening and Closing a File......Page 456 Reading and Writing Text Files......Page 459 Unformatted Binary I/ O......Page 460 Reading and Writing Blocks of Data......Page 462 Detecting EOF......Page 463 A File Comparison Example......Page 464 More Binary I/ O Functions......Page 465 Random Access......Page 467 Checking I/ O Status......Page 469 Customized I/ O and Files......Page 470 19 Run-Time Type ID and the Casting Operators......Page 472 Run- Time Type Identification ( RTTI)......Page 473 A Simple Application of Run- Time Type ID......Page 477 typeid Can Be Applied to Template Classes......Page 479 dynamic_ cast......Page 483 const_ cast......Page 488 static_ cast......Page 489 reinterpret_ cast......Page 490 The Traditional Cast Versus the Four Casting Operators......Page 491 20 Namespaces and Other Advanced Topics......Page 492 Namespace Fundamentals......Page 493 using......Page 496 Unnamed Namespaces......Page 498 The std Namespace......Page 499 Pointers to Functions......Page 501 Finding the Address of an Overloaded Function......Page 504 Static Class Members......Page 505 const Member Functions and mutable......Page 507 Explicit Constructors......Page 509 The Member Initialization Syntax......Page 511 Linkage Specification......Page 514 The .* and ̈C>* Pointer- to- Member Operators......Page 516 Creating Conversion Functions......Page 518 21 Introducing the Standard Template Library......Page 520 An Overview of the STL......Page 521 The Container Classes......Page 523 Vectors......Page 525 Accessing a Vector Through an Iterator......Page 529 Inserting and Deleting Elements in a Vector......Page 530 Storing Class Objects in a Vector......Page 531 The Power of Iterators......Page 534 Lists......Page 535 Sort a List......Page 540 Merging One List with Another......Page 541 Storing Class Objects in a List......Page 542 Maps......Page 544 Storing Class Objects in a Map......Page 549 Algorithms......Page 550 Counting......Page 553 Removing and Replacing Elements......Page 554 Transforming a Sequence......Page 556 The string Class 21......Page 558 Some string Member Functions......Page 562 Final Thoughts on the STL......Page 566 22 The C++ Preprocessor......Page 568 # define......Page 569 Function- Like Macros......Page 571 # include......Page 573 # if, # else, # elif, and # endif......Page 574 # ifdef and # ifndef......Page 576 # undef......Page 577 The Diminishing Role of the Preprocessor......Page 578 # line......Page 579 The # and ## Preprocessor Operators......Page 580 Predefined Macro Names......Page 581 Final Thoughts......Page 582 A C-Based I/Oased I/ O......Page 584 C I/ O Uses Streams......Page 585 printf( )......Page 586 scanf( )......Page 588 The C File System......Page 593 fopen( )......Page 594 fgetc( )......Page 595 Using fopen( ), fgetc( ), fputc( ), and fclose( )......Page 596 ferror( ) and rewind( )......Page 597 fread( ) and fwrite( )......Page 598 fseek( ) and Random- Access I/ O......Page 599 fprintf( ) and fscanf( )......Page 600 Erasing Files......Page 601 B Working with an Older C++ Compiler......Page 602 BookmarkTitle:......Page 0 Two Simple Changes......Page 604 C The .NET Managed Extensions to C++......Page 606 _ _ abstract......Page 607 _ _ nogc......Page 608 Preprocessor Extensions......Page 609 Compiling Managed C++......Page 610 Index......Page 612 All you need to learn C++ is C++ from the Ground Up, written by master C++ programmer Herb Schildt. With C++ fast becoming the professional programmer's language of choice, you'll want to start programming in C++ as quickly as possible. Schildt understands this and gets right to the point in this fast-paced, no-nonsense guide to learning C++. As you may already know, C++ is built on the foundation of C. For this reason, Schildt teaches you just the C you'll need so you can quickly move on to the meat of C++, including its object-oriented features. Schildt's clear instructions, practical examples, and valuable tips put this book in a class by itself. Written in the clear, uncompromising style that has made Schildt's programming books the choice of millions worldwide, C++ from the Ground Up starts with an overview of C++ and the general form of a C++ program. You'll then progress to the fundamentals of C++ programming, including control statements, operators, variables, expressions, and data types. From this foundation, you'll then delve into functions; pointers and references; classes and objects; function and operator overloading; constructors and destructors; templates; exception handling; inheritance; virtual functions; the C++ I/O system; the preprocessor; the principles behind Object-Oriented Programming (OOP); and much, much more. Unlike other C++ programming books, C++ from the Ground Up adheres to the draft ANSI C++ standard, so you will be learning the most up-to-date specification of C++, the version supported by all major C++ compilers. Therefore, what you learn today will still apply tomorrow. If you're ready to start using the power and versatility of C++ - whether you program in DOS, Windows, OS/2, Unix, or any other operating system - Schildt's C++ from the Ground Up is the ideal book for you.
your Fast-paced Guide To C++ Success!
no One Teaches C++ Better Than Herb Schildt. That's Why His Books Are The Choice Of Millions Worldwide. Now You, Too, Can Quickly Master C++ Using His Proven Method. In This Fully Updated New Edition, Herb Explains The C++ Language, From Its Fundamentals To Its Most Advanced Features. You'll Start With An Overview Of C++ And The General Form Of A C++ Program. You'll Then Learn Essentials Such As Control Statements, Operators, Variables, Classes, And Objects. Then It's On To Exceptions, Templates, Namespaces, Run-time Type Id, And The Standard Template Library (stl). There Is Even A Synopsis Of The Extended Keywords Used For .net Programmingall Presented In Herb's Clear, Crisp, Uncompromising Style.
you Will Learn About:
- the General Form Of A C++ Program
- data Types, Operators, And Expressions
- control Statements
- functions
- pointers And References
- classes And Objects
- function And Operator Overloading
- constructors And Destructors
- templates
- exception Handling
- inheritance
- virtual Functions
- the C++ I/o System
- run-time Type Id
- namespaces
- the Standard Template Library (stl)
- object-oriented Programming (oop) Principles
- and Much, Much More!