O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C++ 14 Quick Syntax Reference, Second Edition

Book Description

This updated handy quick C++ 14 guide is a condensed code and syntax reference based on the newly updated C++ 14 release of the popular programming language. It presents the essential C++ syntax in a well-organized format that can be used as a handy reference.

You won’t find any technical jargon, bloated samples, drawn out history lessons, or witty stories in this book. What you will find is a language reference that is concise, to the point and highly accessible. The book is packed with useful information and is a must-have for any C++ programmer.

In the C++ 14 Quick Syntax Reference, Second Edition, you will find a concise reference to the C++ 14 language syntax. It has short, simple, and focused code examples. This book includes a well laid out table of contents and a comprehensive index allowing for easy review.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents at a Glance
  5. Contents
  6. About the Author
  7. Introduction
  8. Chapter 1: Hello World
    1. Choosing an IDE
    2. Creating a Project
    3. Adding a Source File
    4. Hello World
    5. Using Namespace
    6. IntelliSense
  9. Chapter 2: Compile and Run
    1. Visual Studio Compilation
    2. Console Compilation
    3. Comments
  10. Chapter 3: Variables
    1. Data Types
    2. Declaring Variables
    3. Assigning Variables
    4. Variable Scope
    5. Integer Types
    6. Signed and Unsigned Integers
    7. Numeric Literals
    8. Floating-Point Types
    9. Literal Suffixes
    10. Char Type
    11. Bool Type
  11. Chapter 4: Operators
    1. Arithmetic Operators
    2. Assignment Operators
    3. Combined Assignment Operators
    4. Increment and Decrement Operators
    5. Comparison Operators
    6. Logical Operators
    7. Bitwise Operators
    8. Operator Precedence
  12. Chapter 5: Pointers
    1. Creating Pointers
    2. Dereferencing Pointers
    3. Pointing to a Pointer
    4. Dynamic Allocation
    5. Null Pointer
  13. Chapter 6: References
    1. Creating References
    2. References and Pointers
    3. Reference and Pointer Guideline
    4. Rvalue Reference
  14. Chapter 7: Arrays
    1. Array Declaration and Allocation
    2. Array Assignment
    3. Multi-dimensional Arrays
    4. Dynamic Arrays
    5. Array Size
  15. Chapter 8: String
    1. String Combining
    2. Escape Characters
    3. String Compare
    4. String Functions
    5. String Encodings
  16. Chapter 9: Conditionals
    1. If Statement
    2. Switch Statement
    3. Ternary Operator
  17. Chapter 10: Loops
    1. While Loop
    2. Do-while Loop
    3. For Loop
    4. Break and Continue
    5. Goto Statement
  18. Chapter 11: Functions
    1. Defining Functions
    2. Calling Functions
    3. Function Parameters
    4. Default Parameter Values
    5. Function Overloading
    6. Return Statement
    7. Forward Declaration
    8. Pass by Value
    9. Pass by Reference
    10. Pass by Address
    11. Return by Value, Reference or Address
    12. Inline Functions
    13. Auto and Decltype
    14. Lambda Functions
  19. Chapter 12: Class
    1. Class Methods
    2. Inline Methods
    3. Object Creation
    4. Accessing Object Members
    5. Forward Declaration
  20. Chapter 13: Constructor
    1. Constructor Overloading
    2. This keyword
    3. Field Initialization
    4. Default Constructor
    5. Destructor
    6. Special Member Functions
    7. Object Initialization
    8. Direct Initialization
    9. Value Initialization
    10. Copy Initialization
    11. New Initialization
    12. Aggregate Initialization
    13. Uniform Initialization
  21. Chapter 14: Inheritance
    1. Upcasting
    2. Downcasting
    3. Constructor Inheritance
    4. Multiple Inheritance
  22. Chapter 15: Overriding
    1. Hiding Derived Members
    2. Overriding Derived Members
    3. Base Class Scoping
  23. Chapter 16: Access Levels
    1. Private Access
    2. Protected Access
    3. Public Access
    4. Access Level Guideline
    5. Friend Classes and Functions
    6. Public, Protected and Private Inheritance
  24. Chapter 17: Static
    1. Static Fields
    2. Static Methods
    3. Static Local Variables
    4. Static Global Variables
  25. Chapter 18: Enum
    1. Enum Example
    2. Enum Constant Values
    3. Enum Conversions
    4. Enum Scope
    5. Strongly Typed Enums
  26. Chapter 19: Struct and Union
    1. Struct
    2. Declarator List
    3. Union
    4. Anonymous Union
  27. Chapter 20: Operator Overloading
    1. Operator Overloading Example
    2. Binary Operator Overloading
    3. Unary Operator Overloading
    4. Overloadable Operators
  28. Chapter 21: Custom Conversions
    1. Implicit Conversion Constructor
    2. Explicit Conversion Constructor
    3. Conversion Operators
    4. Explicit Conversion Operators
  29. Chapter 22: Namespaces
    1. Accessing Namespace Members
    2. Nesting Namespaces
    3. Importing Namespaces
    4. Namespace Member Import
    5. Namespace Alias
    6. Type Alias
    7. Including Namespace Members
  30. Chapter 23: Constants
    1. Constant Variables
    2. Constant Pointers
    3. Constant References
    4. Constant Objects
    5. Constant Methods
    6. Constant Return Type and Parameters
    7. Constant Fields
    8. Constant Expressions
    9. Constant Guideline
  31. Chapter 24: Preprocessor
    1. Including Source Files
    2. Define
    3. Undefine
    4. Predefined Macros
    5. Macro Functions
    6. Conditional Compilation
    7. Compile if Defined
    8. Error
    9. Line
    10. Pragma
    11. Attributes
  32. Chapter 25: Exception Handling
    1. Throwing Exceptions
    2. Try-catch statement
    3. Re-throwing Exceptions
    4. Exception Specification
    5. Exception Class
  33. Chapter 26: Type Conversions
    1. Implicit Conversions
    2. Explicit Conversions
      1. C++ casts
    3. Static Cast
    4. Reinterpret Cast
    5. Const Cast
    6. C-style and New-Style Casts
    7. Dynamic Cast
    8. Dynamic Cast Examples
    9. Dynamic or Static Cast
  34. Chapter 27: Templates
    1. Function Templates
    2. Calling Function Templates
    3. Multiple Template Parameters
    4. Class Templates
    5. Non-Type Parameters
    6. Default Types and Values
    7. Class Template Specialization
    8. Function Template Specialization
    9. Variable Templates
    10. Variadic Templates
  35. Chapter 28: Headers
    1. Why to Use Headers
    2. Using Headers
    3. What to Include in Headers
    4. Include Guards
  36. Index