万本电子书0元读

万本电子书0元读

顶部广告

Modern C++: Efficient and Scalable Application Development电子书

售       价:¥

7人正在读 | 0人评论 9.8

作       者:Richard Grimes

出  版  社:Packt Publishing

出版时间:2018-12-21

字       数:97.5万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Create apps in C++ and leverage its latest features using modern programming techniques. Key Features *Develop strong C++ skills to build a variety of applications *Explore features of C++17, such as containers, algorithms, and threads *Grasp the standard support for threading and concurrency and use them in basic daily tasks Book Description C++ is one of the most widely used programming languages. It is fast, flexible, and used to solve many programming problems. This Learning Path gives you an in-depth and hands-on experience of working with C++, using the latest recipes and understanding most recent developments. You will explore C++ programming constructs by learning about language structures, functions, and classes, which will help you identify the execution flow through code. You will also understand the importance of the C++ standard library as well as memory allocation for writing better and faster programs. Modern C++: Efficient and Scalable Application Development deals with the challenges faced with advanced C++ programming. You will work through advanced topics such as multithreading, networking, concurrency, lambda expressions, and many more recipes. By the end of this Learning Path, you will have all the skills to become a master C++ programmer. This Learning Path includes content from the following Packt products: *Beginning C++ Programming by Richard Grimes *Modern C++ Programming Cookbook by Marius Bancila *The Modern C++ Challenge by Marius Bancila What you will learn *Become familiar with the structure of C++ projects *Identify the main structures in the language: functions and classes *Learn to debug your programs *Leverage C++ features to obtain increased robustness and performance *Explore functions and callable objects with a focus on modern features *Serialize and deserialize JSON and XML data *Create client-server applications that communicate over TCP/IP *Use design patterns to solve real-world problems Who this book is for This Learning Path is designed for developers who want to gain a solid foundation in C++. The desire to learn how to code in C++ is all you need to get started with this Learning Path
目录展开

Title Page

Copyright

Modern C++: Efficient and Scalable Application Development

About Packt

Why Subscribe?

Packt.com

Contributors

About the Authors

About the Reviewers

Packt Is Searching for Authors Like You

Preface

Who This Book Is For

What This Book Covers

To Get the Most out of This Book

How to generate projects for Visual Studio 2017

Download the Example Code Files

Download the color images

Conventions Used

Get in Touch

Reviews

Understanding Language Features

Writing C++

Using whitespace

Formatting Code

Writing Statements

Working with Expressions

Using the Comma Operator

Using Types and Variables

Using constants and literals

Defining constants

Using Constant Expressions

Using Enumerations

Declaring Pointers

Using Namespaces

C++ Scoping of Variables

Using Operators

Exploring the Built-in Operators

Arithmetic Operators

Increment and Decrement Operators

Bitwise Operators

Boolean Operators

Bitwise Shift Operators

Assignment Operators

Controlling Execution Flow

Using Conditional Statements

Selecting

Looping

Looping with Iteration

Conditional Loops

Jumping

Using C++ language features

Summary

Working with Memory, Arrays, and Pointers

Using memory in C++

Using C++ pointer syntax

Using Null Pointers

Types of Memory

Pointer Arithmetic

Using Arrays

Function parameters

Multidimensional Arrays

Passing Multidimensional Arrays to Functions

Using arrays of characters

Comparing strings

Preventing Buffer Overruns

Using Pointers in C++

Accessing out of Bounds

Pointers to Deallocated Memory

Converting Pointers

Constant Pointers

Changing the Type Pointed To

Allocating memory in code

Allocating individual objects

Allocating Arrays of Objects

Handling failed allocations

Using Other Versions of the New Operator

Memory lifetime

The Windows SDK and Pointers

Memory and the C++ Standard Library

Standard Library arrays

Using the stack-based array class

Using the Dynamically Allocated Vector Class

References

Constant References

Returning References

Temporaries and References

The rvalue References

Ranged for and References

Using Pointers in Practice

Creating the Project

Adding a Task Object to the List

Deleting the task list

Iterating the task list

Inserting Items

Summary

Using Functions

Defining C++ functions

Declaring and defining functions

Specifying linkage

Inlining

Determining the return type

Naming the function

Function parameters

Specifying exceptions

Function body

Using function parameters

Passing Initializer lists

Using default parameters

Variable number of parameters

Initializer lists

Argument lists

Function features

Call stack

Specifying calling conventions

Using C linkage

Specifying how the stack Is maintained

Using recursion

Overloading functions

Functions and scope

Deleted functions

Passing by value and passing by reference

Designing functions

Pre- and post-conditions

Using invariants

Function pointers

Remember the parentheses!

Declaring function pointers

Using function pointers

Templated functions

Defining templates

Using template parameter values

Specialized templates

Variadic templates

Overloaded operators

Function objects

Introducing lambda expressions

Using functions in C++

Summary

Classes

Writing classes

Reviewing structures

Defining classes

Defining class behavior

Using the this pointer

Using the scope resolution operator

Defining class state

Creating objects

Construction of objects

Defining constructors

Delegating constructors

Copy constructor

Converting between types

Making friends

Marking constructors as explicit

Destructing objects

Assigning objects

Move semantics

Declaring static members

Defining static members

Using static and global objects

Named constructors

Nested classes

Accessing const objects

Using objects with pointers

Getting pointers to object members

Operator overloading

Defining function classes

Defining conversion operators

Managing resources

Writing wrapper classes

Using smart pointers

Managing exclusive ownership

Sharing ownership

Handling dangling pointers

Templates

Using classes

Summary

Using the Standard Library Containers

Working with pairs and tuples

Containers

Sequence containers

List

Forward list

Vector

Deque

Associative containers

Maps and multimaps

Sets and multisets

Unordered containers

Special purpose containers

Using iterators

Input and output iterators

Stream iterators

Using iterators with the C Standard Library

Algorithms

Iteration of items

Getting information

Comparing containers

Changing Items

Finding Items

Sorting items

Using the numeric libraries

Compile time arithmetic

Complex numbers

Using the Standard Library

Summary

Using Strings

Using the string class as a container

Getting information about a string

Altering strings

Searching strings

Internationalization

Using facets

Strings and numbers

Converting strings to numbers

Converting numbers to strings

Using stream classes

Outputting floating point numbers

Outputting integers

Outputting time and money

Converting numbers to strings using streams

Reading numbers from strings using streams

Using regular expressions

Defining regular expressions

Standard Library classes

Matching expressions

Using iterators

Replacing strings

Using strings

Creating the project

Processing header subitems

Summary

Diagnostics and Debugging

Preparing your code

Invariants and conditions

Conditional compilation

Using pragmas

Adding informational messages

Compiler switches for debugging

Pre-processor symbols

Producing diagnostic messages

Trace messages with the C runtime

Tracing messages with Windows

Using asserts

Application termination

Error values

Obtaining message descriptions

Using the Message Compiler

C++ exceptions

Exception specifications

C++ exception syntax

Standard exception classes

Catching exceptions by type

Function try blocks

System errors

Nested exceptions

Structured Exception Handling

Compiler exception switches

Mixing C++ and SEH exception handling

Writing exception-safe classes

Summary

Learning Modern Core Language Features

Using auto whenever possible

How to do it...

How it works...

See also

Creating type aliases and alias templates

How to do it...

How it works...

Understanding uniform initialization

Getting ready

How to do it...

How it works...

There's more

See also

Understanding the various forms of non-static member initialization

How to do it...

How it works...

Controlling and querying object alignment

Getting ready

How to do it...

How it works...

Using scoped enumerations

How to do it...

How it works...

Using override and final for virtual methods

Getting ready

How to do it...

How it works...

Using range-based for loops to iterate on a range

Getting ready

How to do it...

How it works...

See also

Enabling range-based for loops for custom types

Getting ready

How to do it...

How it works...

See also

Using explicit constructors and conversion operators to avoid implicit conversion

Getting ready

How to do it...

How it works...

See also

Using unnamed namespaces instead of static globals

Getting ready

How to do it...

How it works...

See also

Using inline namespaces for symbol versioning

Getting ready

How to do it...

How it works...

See also

Using structured bindings to handle multi-return values

Getting ready

How to do it...

How it works...

Working with Numbers and Strings

Converting between numeric and string types

Getting ready

How to do it...

How it works...

See also

Limits and other properties of numeric types

Getting ready

How to do it...

How it works...

Generating pseudo-random numbers

Getting ready

How to do it...

How it works...

See also

Initializing all bits of internal state of a pseudo-random number generator

Getting ready

How to do it...

How it works...

Creating cooked user-defined literals

Getting ready

How to do it...

How it works...

There's more...

See also

Creating raw user-defined literals

Getting ready

How to do it...

How it works...

See also

Using raw string literals to avoid escaping characters

Getting ready

How to do it...

How it works...

See also

Creating a library of string helpers

Getting ready

How to do it...

How it works...

See also

Verifying the format of a string using regular expressions

Getting ready

How to do it...

How it works...

There's more...

See also

Parsing the content of a string using regular expressions

Getting ready

How to do it...

How it works...

See also

Replacing the content of a string using regular expressions

Getting ready

How to do it...

How it works...

See also

Using string_view instead of constant string references

Getting ready

How to do it...

How it works...

See also

Exploring Functions

Defaulted and deleted functions

Getting started

How to do it...

How it works...

Using lambdas with standard algorithms

Getting ready

How to do it...

How it works...

There's more...

See also

Using generic lambdas

Getting started

How to do it...

How it works...

See also

Writing a recursive lambda

Getting ready

How to do it...

How it works...

Writing a function template with a variable number of arguments

Getting ready

How to do it...

How it works...

See also

Using fold expressions to simplify variadic function templates

Getting ready

How to do it...

How it works...

There's more...

See also

Implementing higher-order functions map and fold

Getting ready

How to do it...

How it works...

There's more...

See also

Composing functions into a higher-order function

Getting ready

How to do it...

How it works...

There's more...

See also

Uniformly invoking anything callable

Getting ready

How to do it...

How it works...

See also

Standard Library Containers, Algorithms, and Iterators

Using vector as a default container

Getting ready

How to do it...

How it works...

There’s more...

See also

Using bitset for fixed-size sequences of bits

Getting ready

How to do it...

How it works...

There's more...

See also

Using vector<bool> for variable-size sequences of bits

Getting ready...

How to do it...

How it works...

There's more...

See also

Finding elements in a range

Getting ready

How to do it...

How it works...

There's more...

See also

Sorting a range

Getting ready

How to do it...

How it works...

There's more...

See also

Initializing a range

Getting ready

How to do it...

How it works...

See also

Using set operations on a range

Getting ready

How to do it...

How it works...

See also

Using iterators to insert new elements in a container

Getting ready

How to do it...

How it works...

There's more...

See also

Writing your own random access iterator

Getting ready

How to do it...

How it works...

There's more...

See also

Container access with non-member functions

Getting ready

How to do it...

How it works...

There's more...

See also

Math Problems

Problems

1. Sum of naturals divisible by 3 and 5

2. Greatest common divisor

3. Least common multiple

4. Largest prime smaller than given number

5. Sexy prime pairs

6. Abundant numbers

7. Amicable numbers

8. Armstrong numbers

9. Prime factors of a number

10. Gray code

11. Converting numerical values to Roman

12. Largest Collatz sequence

13. Computing the value of Pi

14. Validating ISBNs

Solutions

1. Sum of naturals divisible by 3 and 5

2. Greatest common divisor

3. Least common multiple

4. Largest prime smaller than given number

5. Sexy prime pairs

6. Abundant numbers

7. Amicable numbers

8. Armstrong numbers

9. Prime factors of a number

10. Gray code

11. Converting numerical values to Roman

12. Largest Collatz sequence

13. Computing the value of Pi

14. Validating ISBNs

Language Features

Problems

15. IPv4 data type

16. Enumerating IPv4 addresses in a range

17. Creating a 2D array with basic operations

18. Minimum function with any number of arguments

19. Adding a range of values to a container

20. Container any, all, none

21. System handle wrapper

22. Literals of various temperature scales

Solutions

15. IPv4 data type

16. Enumerating IPv4 addresses in a range

17. Creating a 2D array with basic operations

18. Minimum function with any number of arguments

19. Adding a range of values to a container

20. Container any, all, none

21. System handle wrapper

22. Literals of various temperature scales

Strings and Regular Expressions

Problems

23. Binary to string conversion

24. String to binary conversion

25. Capitalizing an article title

26. Joining strings together separated by a delimiter

27. Splitting a string into tokens with a list of possible delimiters

28. Longest palindromic substring

29. License plate validation

30. Extracting URL parts

31. Transforming dates in strings

Solutions

23. Binary to string conversion

24. String to binary conversion

25. Capitalizing an article title

26. Joining strings together separated by a delimiter

27. Splitting a string into tokens with a list of possible delimiters

28. Longest palindromic substring

29. License plate validation

30. Extracting URL parts

31. Transforming dates in strings

Streams and Filesystems

Problems

32. Pascal's triangle

33. Tabular printing of a list of processes

34. Removing empty lines from a text file

35. Computing the size of a directory

36. Deleting files older than a given date

37. Finding files in a directory that match a regular expression

38. Temporary log files

Solutions

32. Pascal's triangle

33. Tabular printing of a list of processes

34. Removing empty lines from a text file

35. Computing the size of a directory

36. Deleting files older than a given date

37. Finding files in a directory that match a regular expression

38. Temporary log files

Date and Time

Problems

39. Measuring function execution time

40. Number of days between two dates

41. Day of the week

42. Day and week of the year

43. Meeting time for multiple time zones

44. Monthly calendar

Solutions

39. Measuring function execution time

40. Number of days between two dates

41. Day of the week

42. Day and week of the year

43. Meeting time for multiple time zones

44. Monthly calendar

Algorithms and Data Structures

Problems

45. Priority queue

46. Circular buffer

47. Double buffer

48. The most frequent element in a range

49. Text histogram

50. Filtering a list of phone numbers

51. Transforming a list of phone numbers

52. Generating all the permutations of a string

53. Average rating of movies

54. Pairwise algorithm

55. Zip algorithm

56. Select algorithm

57. Sort algorithm

58. The shortest path between nodes

59. The Weasel program

60. The Game of Life

Solutions

45. Priority queue

46. Circular buffer

47. Double buffer

48. The most frequent element in a range

49. Text histogram

50. Filtering a list of phone numbers

51. Transforming a list of phone numbers

52. Generating all the permutations of a string

53. Average rating of movies

54. Pairwise algorithm

55. Zip algorithm

56. Select algorithm

57. Sort algorithm

58. The shortest path between nodes

59. The Weasel program

60. The Game of Life

Other Books You May Enjoy

Leave a Review - Let Other Readers Know What You Think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部