0%

Book Description

Discover everything you need to know about C++ in a logical progression of small lessons that you can work through as quickly or as slowly as you need. This book divides C++ up into bite-sized chunks that will help you learn the language one step at a time. Fully updated to include C++20, it assumes no familiarity with C++ or any other C-based language.

Exploring C++20 acknowledges that C++ can be a complicated language, so rather than baffle you with complex chapters explaining functions, classes, and statements in isolation you’ll focus on how to achieve results. By learning a little bit of this and a little of that you’ll soon have amassed enough knowledge to be writing non-trivial programs and will have built a solid foundation of experience that puts those previously baffling concepts into context.

In this fully-revised third edition of Exploring C++, you’ll learn how to use the standard library early in the book. Next, you’ll work with operators, objects, and data-sources in increasingly realistic situations. Finally, you’ll start putting the pieces together to create sophisticated programs of your own design confident that you’ve built a firm base of experience from which to grow.

What You Will Learn

  • Grasp the basics, including compound statements, modules, and more
  • Work with custom types and see how to use them
  • Write useful algorithms, functions, and more
  • Discover the latest C++ 20 features, including concepts, modules, and ranges
  • Apply your skills to projects that include a fixed-point numbers and body-mass index applications
  • Carry out generic programming and apply it in a practical project
  • Exploit multiple inheritance, traits/policies, overloaded functions, and metaprogramming

Who This Book Is For

Experienced programmers who may have little or no experience with C++ who want an accelerated learning guide to C++20 so they can hit the ground running.  

 

Table of Contents

  1. Cover
  2. Front Matter
  3. Part I. The Basics
    1. 1. Honing Your Tools
    2. 2. Reading C++ Code
    3. 3. Integer Expressions
    4. 4. Strings
    5. 5. Simple Input
    6. 6. Error Messages
    7. 7. More Loops
    8. 8. Formatted Output
    9. 9. Arrays and Vectors
    10. 10. Algorithms and Ranges
    11. 11. Increment and Decrement
    12. 12. Conditions and Logic
    13. 13. Compound Statements
    14. 14. Introduction to File I/O
    15. 15. The Map Data Structure
    16. 16. Type Synonyms
    17. 17. Characters
    18. 18. Character Categories
    19. 19. Case-Folding
    20. 20. Writing Functions
    21. 21. Function Arguments
    22. 22. Using Ranges
    23. 23. Using Iterators
    24. 24. Unnamed Functions
    25. 25. Overloading Function Names
    26. 26. Big and Little Numbers
    27. 27. Very Big and Very Little Numbers
    28. 28. Documentation
    29. 29. Project 1: Body Mass Index
  4. Part II. Custom Types
    1. 30. Custom Types
    2. 31. Overloading Operators
    3. 32. Custom I/O Operators
    4. 33. Assignment and Initialization
    5. 34. Writing Classes
    6. 35. More About Member Functions
    7. 36. Access Levels
    8. 37. Understanding Object-Oriented Programming
    9. 38. Inheritance
    10. 39. Virtual Functions
    11. 40. Classes and Types
    12. 41. Declarations and Definitions
    13. 42. Modules
    14. 43. Old-Fashioned “Modules”
    15. 44. Function Objects
    16. 45. Useful Algorithms
    17. 46. More About Iterators
    18. 47. Ranges, Views, and Adaptors
    19. 48. Exceptions
    20. 49. More Operators
    21. 50. Project 2: Fixed-Point Numbers
  5. Part III. Generic Programming
    1. 51. Function Templates
    2. 52. Class Templates
    3. 53. Template Specialization
    4. 54. Partial Template Specialization
    5. 55. Template Constraints
    6. 56. Names and Namespaces
    7. 57. Containers
    8. 58. Locales and Facets
    9. 59. International Characters
    10. 60. Text I/O
    11. 61. Project 3: Currency Type
  6. Part IV. Real Programming
    1. 62. Pointers
    2. 63. Regular Expressions
    3. 64. Moving Data with Rvalue References
    4. 65. Smart Pointers
    5. 66. Files and File Names
    6. 67. Working with Bits
    7. 68. Enumerations
    8. 69. Multiple Inheritance
    9. 70. Concepts, Traits, and Policies
    10. 71. Names, Namespaces, and Templates
    11. 72. Overloaded Functions and Operators
    12. 73. Programming at Compile Time
    13. 74. Project 4: Calculator
  7. Back Matter
3.138.138.144