C++ in One Hour a Day, Sams Teach Yourself
Home > Computing and Information Technology > Computer programming / software engineering > Programming and scripting languages: general > C++ in One Hour a Day, Sams Teach Yourself: (Sams Teach Yourself)
C++ in One Hour a Day, Sams Teach Yourself: (Sams Teach Yourself)

C++ in One Hour a Day, Sams Teach Yourself: (Sams Teach Yourself)


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

In just one hour a day, you’ll have all the skills you need to begin programming in C++. With this complete tutorial, you’ll quickly master the basics, and then move on to more advanced features and concepts. Completely updated for the C++14 standard, with a preview of C++17, this book presents the language from a practical point of view, helping you learn how to use C++ to create faster, simpler, and more efficient C++ applications. Master the fundamentals of C++ and object-oriented programming Understand how C++ features help you write compact and efficient code using concepts such as lambda expressions, move constructors, and assignment operators Learn best practices and avoid pitfalls via useful Do’s and Don’ts  Learn the Standard Template Library, including containers and algorithms used in most real-world C++ applications Test your knowledge and expertise with exercises at the end of every lesson  Learn on your own time, at your own pace: No previous programming experience required Write fast and powerful C++ programs, compile the source code, and create executable files Learn object-oriented programming concepts such as encapsulation, abstraction, inheritance, and polymorphism Use the Standard Template Library’s algorithms and containers to write feature-rich yet stable C++ applications Learn how automatic type deduction helps simplify C++ code Develop sophisticated programming techniques using lambda expressions, smart pointers, and move constructors Master the features of C++ by learning from programming experts Learn C++ features that allow you to program compact and high-performance C++ applications Preview what’s new in C++17 Contents at a Glance Part I: The Basics Lesson 1: Getting Started Lesson 2: The Anatomy of a C++ Program Lesson 3: Using Variables, Declaring Constants Lesson 4: Managing Arrays and Strings Lesson 5: Working with Expressions, Statements, and Operators Lesson 6: Controlling Program Flow Lesson 7: Organizing Code with Functions Lesson 8: Pointers and References Explained Part II: Fundamentals of Object-Oriented C++ Programming Lesson 9: Classes and Objects Lesson 10: Implementing Inheritance Lesson 11: Polymorphism Lesson 12: Operator Types and Operator Overloading Lesson 13: Casting Operators Lesson 14: An Introduction to Macros and Templates Part III: Learning the Standard Template Library (STL) Lesson 15: An Introduction to the Standard Template Library Lesson 16: The STL String Class Lesson 17: STL Dynamic Array Classes Lesson 18: STL list and forward_list Lesson 19: STL Set Classes  Lesson 20: STL Map Classes Part IV: More STL Lesson 21: Understanding Function Objects Lesson 22: Lambda Expressions  Lesson 23: STL Algorithms Lesson 24: Adaptive Containers: Stack and Queue Lesson 25: Working with Bit Flags Using STL Part V: Advanced C++ Concepts Lesson 26: Understanding Smart Pointers Lesson 27: Using Streams for Input and Output  Lesson 28: Exception Handling Lesson 29: Going Forward Part VI: Appendixes Appendix A: Working with Numbers: Binary and Hexadecimal Appendix B: C++ Keywords Appendix C: Operator Precedence Appendix D: ASCII Codes Appendix E: Answers

Table of Contents:
Part I: The Basics Lesson 1: Getting Started   A Brief History of C++     Connection to C     Advantages of C++     Evolution of the C++ Standard     Who Uses Programs Written in C++?   Programming a C++ Application     Steps to Generating an Executable     Analyzing Errors and “Debugging”     Integrated Development Environments     Programming Your First C++ Application     Building and Executing Your First C++ Application     Understanding Compiler Errors   What’s New in C++? Lesson 2: The Anatomy of a C++ Program   Parts of the Hello World Program   Preprocessor Directive #include   The Body of Your Program main()     Returning a Value   The Concept of Namespaces   Comments in C++ Code   Functions in C++   Basic Input Using std::cin and Output Using std::cout Lesson 3: Using Variables, Declaring Constants   What Is a Variable?     Memory and Addressing in Brief     Declaring Variables to Access and Use Memory     Declaring and Initializing Multiple Variables of a Type     Understanding the Scope of a Variable     Global Variables     Naming Conventions   Common Compiler-Supported C++ Variable Types     Using Type bool to Store Boolean Values     Using Type char to Store Character Values     The Concept of Signed and Unsigned Integers     Signed Integer Types short, int, long, and long long   Unsigned Integer Types unsigned short, unsigned int, unsigned long, and unsigned long     long     Avoid Overflow Errors by Selecting Correct Data Types     Floating-Point Types float and double   Determining the Size of a Variable Using sizeof     Avoid Narrowing Conversion Errors by Using List Initialization   Automatic Type Inference Using auto   Using typedef to Substitute a Variable’s Type   What Is a Constant?     Literal Constants     Declaring Variables as Constants Using const     Constant Expressions Using constexpr     Enumerations     Defining Constants Using #define   Keywords You Cannot Use as Variable or Constant Names Lesson 4: Managing Arrays and Strings   What Is an Array?     The Need for Arrays     Declaring and Initializing Static Arrays     How Data Is Stored in an Array     Accessing Data Stored in an Array     Modifying Data Stored in an Array   Multidimensional Arrays     Declaring and Initializing Multidimensional Arrays     Accessing Elements in a Multidimensional Array   Dynamic Arrays   C-style Character Strings   C++ Strings: Using std::string Lesson 5: Working with Expressions, Statements, and Operators   Statements   Compound Statements or Blocks   Using Operators     The Assignment Operator (=)     Understanding L-values and R-values     Operators to Add (+), Subtract (-), Multiply (*), Divide (/), and Modulo Divide (%)     Operators to Increment (++) and Decrement (--)     To Postfix or to Prefix?     Equality Operators (==) and (!=)     Relational Operators     Logical Operations NOT, AND, OR, and XOR     Using C++ Logical Operators NOT (!), AND (&&), and OR (||)     Bitwise NOT (~), AND (&), OR (|), and XOR (^) Operators     Bitwise Right Shift (>>) and Left Shift (<<) Operators     Compound Assignment Operators     Using Operator sizeof to Determine the Memory Occupied by a Variable     Operator Precedence Lesson 6: Controlling Program Flow   Conditional Execution Using if … else     Conditional Programming Using if … else     Executing Multiple Statements Conditionally     Nested if Statements     Conditional Processing Using switch-case     Conditional Execution Using Operator (?:)   Getting Code to Execute in Loops     A Rudimentary Loop Using goto     The while Loop     The do…while Loop     The for Loop     The Range-Based for Loop   Modifying Loop Behavior Using continue and break     Loops That Don’t End–That Is, Infinite Loops     Controlling Infinite Loops   Programming Nested Loops     Using Nested Loops to Walk a Multidimensional Array     Using Nested Loops to Calculate Fibonacci Numbers Lesson 7: Organizing Code with Functions   The Need for Functions     What Is a Function Prototype?     What Is a Function Definition?     What Is a Function Call, and What Are Arguments?     Programming a Function with Multiple Parameters     Programming Functions with No Parameters or No Return Values     Function Parameters with Default Values     Recursion–Functions That Invoke Themselves     Functions with Multiple Return Statements   Using Functions to Work with Different Forms of Data     Overloading Functions     Passing an Array of Values to a Function     Passing Arguments by Reference   How Function Calls Are Handled by the Microprocessor     Inline Functions     Automatic Return Type Deduction     Lambda Functions Lesson 8: Pointers and References Explained   What Is a Pointer?     Declaring a Pointer     Determining the Address of a Variable Using the Reference Operator (&)     Using Pointers to Store Addresses     Access Pointed Data Using the Dereference Operator (*)     What Is the sizeof() of a Pointer?   Dynamic Memory Allocation     Using Operators new and delete to Allocate     and Release Memory Dynamically     Effect of Incrementing and Decrementing Operators (++ and --) on Pointers     Using the const Keyword on Pointers     Passing Pointers to Functions     Similarities between Arrays and Pointers   Common Programming Mistakes When Using Pointers     Memory Leaks     When Pointers Don’t Point to Valid Memory Locations     Dangling Pointers (Also Called Stray or Wild Pointers)     Checking Whether Allocation Request Using new Succeeded   Pointer Programming Best-Practices   What Is a Reference?     What Makes References Useful?     Using Keyword const on References     Passing Arguments by Reference to Functions Part II: Fundamentals of Object-Oriented C++ Programming Lesson 9: Classes and Objects   The Concept of Classes and Objects     Declaring a Class     An Object as an Instance of a Class     Accessing Members Using the Dot Operator (.)     Accessing Members Using the Pointer Operator (->)   Keywords public and private     Abstraction of Data via Keyword private   Constructors     Declaring and Implementing a Constructor     When and How to Use Constructors     Overloading Constructors     Class Without a Default Constructor     Constructor Parameters with Default Values     Constructors with Initialization Lists   Destructor     Declaring and Implementing a Destructor     When and How to Use a Destructor   Copy Constructor     Shallow Copying and Associated Problems     Ensuring Deep Copy Using a Copy Constructor     Move Constructors Help Improve Performance   Different Uses of Constructors and the Destructor     Class That Does Not Permit Copying     Singleton Class That Permits a Single Instance     Class That Prohibits Instantiation on the Stack     Using Constructors to Convert Types   this Pointer   sizeof() a Class   How struct Differs from class   Declaring a friend of a class   union: A Special Data Storage Mechanism     Declaring a Union     Where Would You Use a union?   Using Aggregate Initialization on Classes and Structs     constexpr with Classes and Objects Lesson 10: Implementing Inheritance   Basics of Inheritance     Inheritance and Derivation     C++ Syntax of Derivation     Access Specifier Keyword protected     Base Class Initialization–Passing Parameters to the Base Class     Derived Class Overriding Base Class’s Methods     Invoking Overridden Methods of a Base Class     Invoking Methods of a Base Class in a Derived Class     Derived Class Hiding Base Class’s Methods     Order of Construction     Order of Destruction   Private Inheritance   Protected Inheritance   The Problem of Slicing   Multiple Inheritance   Avoiding Inheritance Using final Lesson 11: Polymorphism   Basics of Polymorphism     Need for Polymorphic Behavior     Polymorphic Behavior Implemented Using Virtual Functions     Need for Virtual Destructors     How Do virtual Functions Work? Understanding the Virtual Function Table     Abstract Base Classes and Pure Virtual Functions   Using virtual Inheritance to Solve the Diamond Problem   Specifier Override to Indicate Intention to Override   Use final to Prevent Function Overriding   Virtual Copy Constructors? Lesson 12: Operator Types and Operator Overloading   What Are Operators in C++?   Unary Operators     Types of Unary Operators     Programming a Unary Increment/Decrement Operator     Programming Conversion Operators     Programming Dereference Operator (*) and Member     Selection Operator (->)   Binary Operators     Types of Binary Operators     Programming Binary Addition (a+b) and Subtraction (a-b) Operators     Implementing Addition Assignment (+=) and Subtraction Assignment (-=) Operators     Overloading Equality (==) and Inequality (!=) Operators     Overloading <, >, <=, and >= Operators     Overloading Copy Assignment Operator (=)     Subscript Operator ([])   Function Operator ()   Move Constructor and Move Assignment Operator for High Performance Programming     The Problem of Unwanted Copy Steps     Declaring a Move Constructor and Move Assignment Operator   User Defined Literals   Operators That Cannot Be Overloaded Lesson 13: Casting Operators   The Need for Casting   Why C-Style Casts Are Not Popular with Some C++ Programmers   The C++ Casting Operators     Using static_cast     Using dynamic_cast and Runtime Type Identification     Using reinterpret_cast     Using const_cast   Problems with the C++ Casting Operators Lesson 14: An Introduction to Macros and Templates   The Preprocessor and the Compiler   Using Macro #define to Define Constants     Using Macros for Protection against Multiple Inclusion   Using #define to Write Macro Functions     Why All the Parentheses?     Using Macro assert to Validate Expressions     Advantages and Disadvantages of Using Macro Functions   An Introduction to Templates     Template Declaration Syntax     The Different Types of Template Declarations     Template Functions     Templates and Type Safety     Template Classes     Declaring Templates with Multiple Parameters     Declaring Templates with Default Parameters     Sample Template class<> HoldsPair     Template Instantiation and Specialization     Template Classes and static Members     Variable Templates, Also Called Variadic Templates     Using static_assert to Perform Compile-Time Checks     Using Templates in Practical C++ Programming Part III: Learning the Standard Template Library (STL) Lesson 15: An Introduction to the Standard Template Library   STL Containers     Sequential Containers     Associative Containers     Container Adapters   STL Iterators   STL Algorithms   The Interaction between Containers and Algorithms Using Iterators     Using Keyword auto to Let Compiler Define Type   Choosing the Right Container   STL String Classes Lesson 16: The STL String Class   The Need for String Manipulation Classes   Working with the STL String Class     Instantiating the STL String and Making Copies     Accessing Character Contents of a std::string     Concatenating One String to Another     Finding a Character or Substring in a String     Truncating an STL string     String Reversal     String Case Conversion   Template-Based Implementation of an STL String   C++14 operator “”s in std::string Lesson 17: STL Dynamic Array Classes   The Characteristics of std::vector   Typical Vector Operations     Instantiating a Vector     Inserting Elements at the End Using push_back()     List Initialization     Inserting Elements at a Given Position Using insert()     Accessing Elements in a Vector Using Array Semantics     Accessing Elements in a Vector Using Pointer Semantics     Removing Elements from a Vector   Understanding the Concepts of Size and Capacity   The STL deque Class Lesson 18: STL list and forward_list   The Characteristics of a std::list   Basic list Operations     Instantiating a std::list Object     Inserting Elements at the Front or Back of the List     Inserting at the Middle of the List     Erasing Elements from the List   Reversing and Sorting Elements in a List     Reversing Elements Using list::reverse()     Sorting Elements     Sorting and Removing Elements from a list That Contains     Instances of a class     std::forward_list Introduced in C++11 Lesson 19: STL Set Classes   An Introduction to STL Set Classes   Basic STL set and multiset Operations     Instantiating a std::set Object     Inserting Elements in a set or multiset     Finding Elements in an STL set or multiset     Erasing Elements in an STL set or multiset   Pros and Cons of Using STL set and multiset     STL Hash Set Implementation std::unordered_set and     std::unordered_multiset Lesson 20: STL Map Classes   An Introduction to STL Map Classes   Basic std::map and std::multimap Operations     Instantiating a std::map or std::multimap     Inserting Elements in an STL map or multimap     Finding Elements in an STL map     Finding Elements in an STL multimap     Erasing Elements from an STL map or multimap   Supplying a Custom Sort Predicate   STL’s Hash Table-Based Key-Value Container     How Hash Tables Work     Using unordered_map and unordered_multimap Part IV: More STL Lesson 21: Understanding Function Objects   The Concept of Function Objects and Predicates   Typical Applications of Function Objects     Unary Functions     Unary Predicate     Binary Functions     Binary Predicate Lesson 22: Lambda Expressions   What Is a Lambda Expression?   How to Define a Lambda Expression   Lambda Expression for a Unary Function   Lambda Expression for a Unary Predicate   Lambda Expression with State via Capture Lists [...]   The Generic Syntax of Lambda Expressions   Lambda Expression for a Binary Function   Lambda Expression for a Binary Predicate Lesson 23: STL Algorithms   What Are STL Algorithms?   Classification of STL Algorithms     Non-Mutating Algorithms     Mutating Algorithms   Usage of STL Algorithms     Finding Elements Given a Value or a Condition     Counting Elements Given a Value or a Condition     Searching for an Element or a Range in a Collection     Initializing Elements in a Container to a Specific Value     Using std::generate() to Initialize Elements to a Value Generated at Runtime     Processing Elements in a Range Using for_each()     Performing Transformations on a Range Using std::transform()     Copy and Remove Operations     Replacing Values and Replacing Element Given a Condition     Sorting and Searching in a Sorted Collection and Erasing Duplicates     Partitioning a Range     Inserting Elements in a Sorted Collection Lesson 24: Adaptive Containers: Stack and Queue   The Behavioral Characteristics of Stacks and Queues     Stacks     Queues   Using the STL stack Class     Instantiating the Stack     Stack Member Functions     Insertion and Removal at Top Using push() and pop()   Using the STL queue Class     Instantiating the Queue     Member Functions of a queue     Insertion at End and Removal at the Beginning of queue via push() and pop()   Using the STL Priority Queue     Instantiating the priority_queue Class     Member Functions of priority_queue     Insertion at the End and Removal at the Beginning of priority_queue via push() and pop() Lesson 25: Working with Bit Flags Using STL   The bitset Class     Instantiating the std::bitset   Using std::bitset and Its Members     Useful Operators Featured in std::bitset     std::bitset Member Methods   The vector     Instantiating vector     vector Functions and Operators Part V: Advanced C++ Concepts Lesson 26: Understanding Smart Pointers   What Are Smart Pointers?     The Problem with Using Conventional (Raw) Pointers     How Do Smart Pointers Help?   How Are Smart Pointers Implemented?   Types of Smart Pointers     Deep Copy     Copy on Write Mechanism     Reference-Counted Smart Pointers     Reference-Linked Smart Pointers     Destructive Copy     Using the std::unique_ptr   Popular Smart Pointer Libraries Lesson 27: Using Streams for Input and Output   Concept of Streams   Important C++ Stream Classes and Objects   Using std::cout for Writing Formatted Data to Console     Changing Display Number Formats Using std::cout     Aligning Text and Setting Field Width Using std::cout   Using std::cin for Input     Using std::cin for Input into a Plain Old Data Type     Using std::cin::get for Input into char* Buffer     Using std::cin for Input into a std::string   Using std::fstream for File Handling     Opening and Closing a File Using open() and close()     Creating and Writing a Text File Using open() and operator<<     Reading a Text File Using open() and operator>>     Writing to and Reading from a Binary File   Using std::stringstream for String Conversions Lesson 28: Exception Handling   What Is an Exception?   What Causes Exceptions?   Implementing Exception Safety via try and catch     Using catch(...) to Handle All Exceptions     Catching Exception of a Type   Throwing Exception of a Type Using throw   How Exception Handling Works   Class std::exception   Your Custom Exception Class Derived from std::exception Lesson 29: Going Forward   What’s Different in Today’s Processors?   How to Better Use Multiple Cores     What Is a Thread?     Why Program Multithreaded Applications?     How Can Threads Transact Data?     Using Mutexes and Semaphores to Synchronize Threads     Problems Caused by Multithreading   Writing Great C++ Code   C++17: Expected Features     if and switch Support Initializers     Copy Elision Guarantee     std::string_view Avoids Allocation Overheads     std::variant As a Typesafe Alternative to a union     Conditional Code Compilation Using if constexpr     Improved Lambda Expressions     Automatic Type Deduction for Constructors     template   Learning C++ Doesn’t Stop Here!     Online Documentation     Communities for Guidance and Help Part VI: Appendixes Appendix A: Working with Numbers: Binary and Hexadecimal Appendix B: C++ Keywords Appendix C: Operator Precedence Appendix D: ASCII Codes Appendix E: Answers     9780789757746   TOC   11/29/2016  

About the Author :
Siddhartha Rao has two decades of experience in software development and is the Vice President in charge of Security Response at SAP SE. The evolution of C++ convinces Siddhartha that you can program faster, simpler, and more powerful applications than ever before. 


Best Sellers


Product Details
  • ISBN-13: 9780134449203
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison Wesley
  • Language: English
  • Series Title: Sams Teach Yourself
  • ISBN-10: 0134449207
  • Publisher Date: 28 Dec 2016
  • Binding: Digital download
  • No of Pages: 800
  • Weight: 1 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
C++ in One Hour a Day, Sams Teach Yourself: (Sams Teach Yourself)
Pearson Education (US) -
C++ in One Hour a Day, Sams Teach Yourself: (Sams Teach Yourself)
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

C++ in One Hour a Day, Sams Teach Yourself: (Sams Teach Yourself)

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!