C++17 quick syntax reference: a pocket guide to the language, APIs and library [Third edition] 9781484235997, 9781484236000, 1484235991, 1484236009

This quick C++17 guide is a condensed code and syntax reference to the popular programming language, fully updated for C

784 93 487KB

English Pages xviii, 186 pages: illustrations, fichiers PDF Year 2018

Report DMCA / Copyright

DOWNLOAD FILE

C++17 quick syntax reference: a pocket guide to the language, APIs and library [Third edition]
 9781484235997, 9781484236000, 1484235991, 1484236009

Table of contents :
Intro
Table of Contents
About the Author
About the Technical Reviewer
Introduction
Chapter 1: Hello World
Choosing an IDE
Creating a Project
Adding a Source File
Selecting Language Standard
Hello World
Using the Standard Namespace
IntelliSense
Chapter 2: Compile and Run
Visual Studio Compilation
Console Compilation
Comments
Chapter 3: Variables
Data Types
Declaring Variables
Assigning Variables
Variable Scope
Integer Types
Signed and Unsigned Integers
Numeric Literals
Floating-Point Types
Literal Suffixes
Char Type
Bool Type
Chapter 4: Operators. Arithmetic OperatorsAssignment Operators
Increment and Decrement Operators
Comparison Operators
Logical Operators
Bitwise Operators
Operator Precedence
Chapter 5: Pointers
Creating Pointers
Dereferencing Pointers
Pointing to a Pointer
Dynamic Allocation
Null Pointer
Chapter 6: References
Creating References
References and Pointers
Reference and Pointer Guideline
Rvalue Reference
Chapter 7: Arrays
Array Declaration and Allocation
Array Assignment
Multi-Dimensional Arrays
Dynamic Arrays
Array Size
Chapter 8: Strings
String Combining
Escape Characters
String Compare. String FunctionsString Encodings
Chapter 9: Conditionals
If Statement
Switch Statement
Ternary Operator
Initializers
Chapter 10: Loops
While Loop
Do-while Loop
For Loop
Break and Continue
Goto Statement
Chapter 11: Functions
Defining Functions
Calling Functions
Function Parameters
Default Parameter Values
Function Overloading
Return Statement
Forward Declaration
Pass by Value
Pass by Reference
Pass by Address
Return by Value, Reference, or Address
Inline Functions
Auto and Decltype
Returning Multiple Values
Lambda Functions
Chapter 12: Classes
Class Methods. Inline MethodsObject Creation
Accessing Object Members
Forward Declaration
Chapter 13: Constructors
Constructor Overloading
This Keyword
Field Initialization
Default Constructor
Destructor
Special Member Functions
Object Initialization
Direct Initialization
Value Initialization
Copy Initialization
New Initialization
Aggregate Initialization
Uniform Initialization
Chapter 14: Inheritance
Upcasting
Downcasting
Constructor Inheritance
Multiple Inheritance
Chapter 15: Overriding
Hiding Derived Members
Overriding Derived Members
Base Class Scoping. Chapter 16: Access LevelsPrivate Access
Protected Access
Public Access
Access Level Guideline
Friend Classes and Functions
Public, Protected, and Private Inheritance
Chapter 17: Static Members
Static Fields
Static Methods
Static Local Variables
Static Global Variables
Chapter 18: Enum Types
Enum Example
Enum Constant Values
Enum Conversions
Enum Scope
Strongly Typed Enums
Chapter 19: Structs and Unions
Structs
Struct Initialization
Union
Anonymous Union
Chapter 20: Operator Overloading
Operator Overloading Example
Binary Operator Overloading
Unary Operator Overloading.

Polecaj historie