舉報

會員
Expert C++
C++hasevolvedovertheyearsandthelatestrelease–C++20–isnowavailable.SinceC++11,C++hasbeenconstantlyenhancingthelanguagefeatureset.Withthenewversion,you’llexploreanarrayoffeaturessuchasconcepts,modules,ranges,andcoroutines.Thisbookwillbeyourguidetolearningtheintricaciesofthelanguage,techniques,C++tools,andthenewfeaturesintroducedinC++20,whilealsohelpingyouapplythesewhenbuildingmodernandresilientsoftware.You’llstartbyexploringthelatestfeaturesofC++,andthenmoveontoadvancedtechniquessuchasmultithreading,concurrency,debugging,monitoring,andhigh-performanceprogramming.Thebookwilldelveintoobject-orientedprogrammingprinciplesandtheC++StandardTemplateLibrary,andevenshowyouhowtocreatecustomtemplates.Afterthis,you’lllearnaboutdifferentapproachessuchastest-drivendevelopment(TDD),behavior-drivendevelopment(BDD),anddomain-drivendesign(DDD),beforetakingalookatthecodingbestpracticesanddesignpatternsessentialforbuildingprofessional-gradeapplications.Towardtheendofthebook,youwillgainusefulinsightsintotherecentC++advancementsinAIandmachinelearning.BytheendofthisC++programmingbook,you’llhavegainedexpertiseinreal-worldapplicationdevelopment,includingtheprocessofdesigningcomplexsoftware.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Chapter 16
- Chapter 15
- Chapter 14
- Chapter 13
品牌:中圖公司
上架時間:2021-06-24 15:27:34
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-06-24 16:34:55
- Other Books You May Enjoy
- Chapter 16
- Chapter 15
- Chapter 14
- Chapter 13
- Chapter 12
- Chapter 11
- Chapter 10
- Chapter 9
- Chapter 8
- Chapter 7
- Chapter 6
- Chapter 5
- Chapter 4
- Chapter 3
- Chapter 2
- Chapter 1
- Assessments
- Further reading
- Questions
- Summary
- Implementing the query processor
- Implementing the query parser
- Implementing a dialog-based search engine
- Using a knowledge graph
- Building a recommendation engine
- Sorting the results
- Tokenizing documents
- Indexing documents
- Crawling websites
- Dealing with typos in queries
- Providing a convenient user interface
- Understanding the structure of a search engine
- Technical requirements
- Implementing a Dialog-Based Search Engine
- Further reading
- Questions
- Summary
- C++ and ML
- Regression analysis
- Clustering
- Neural networks
- Applications of ML
- Categories of ML
- Designing an algorithm that learns
- Understanding ML
- ML
- Knowledge reasoning
- NLP
- Computer vision
- Introduction to AI
- Technical requirements
- Using C++ in Machine Learning Tasks
- Section 3: C++ in the AI World
- Further reading
- Questions
- Summary
- Composing widgets using layouts
- Common Qt widgets
- Using Qt widgets
- Understanding Model/View programming
- Grasping signals and slots
- Discovering Qt
- Writing a simple application
- Qt's cross-platform model
- Using C++ as Java
- Understanding cross-platform GUI programming
- Technical requirements
- Graphical User Interface with Qt
- Exercises and questions
- Further reading
- Summary
- BDD
- Step 3 – refactoring
- Step 2 – developing code to let the test pass
- Step 1 – writing a failing test
- Example of TDD
- TDD
- Unit testing
- Exploring unit testing TDD and BDD
- Dynamic analysis
- Static analysis
- Understanding static and dynamic analysis
- Practical debugging strategies
- Logging gdb into a text file
- Function breakpoints conditional breakpoints watchpoint and the continue and finish commands
- Setting breakpoints and inspection variable values
- Examples of GDB
- GDB overview
- Tools to debug a C/C++ program
- Debugging C++ programs
- Avoiding memory leaks
- Compile-time checking versus runtime checking
- Order of evaluation problem
- Mixing signed and unsigned problems
- Side effects in compound expressions
- Uninitialized variable problem
- Prevention is better than the cure – a good coding behavior
- The RCA overview
- Understanding the root cause of an issue
- Technical requirements
- Debugging and Testing
- Further reading
- Questions
- Summary
- Securing network applications
- Securing the C++ code
- Implementing a POSIX socket wrapper class
- Using POSIX sockets
- Designing a network application
- Network protocols
- Programming network applications using sockets
- Network applications under the hood
- Discovering network programming in C++
- Technical requirements
- Networking and Security
- Further reading
- Questions
- Summary
- Designing the game loop
- The Prototype pattern
- The Flyweight pattern
- The Observer pattern
- The Command pattern
- Using design patterns
- The game event loop
- Concurrent actions
- Designing game controllers
- Designing buildings
- Designing character units
- Designing the game
- Interaction between the components
- Strategy game components
- Introduction to the Readers and Disturbers game
- Introduction to game design
- Technical requirements
- Designing a Strategy Game Using Design Patterns
- Further reading
- Questions
- Summary
- The factory pattern
- The repository pattern
- Leveraging design patterns
- Using domain-driven design
- The dependency inversion principle
- The interface segregation principle
- The Liskov substitution principle
- The open-closed principle
- The single responsibility principle
- Using SOLID principles
- Diving into the design process
- Release and maintenance
- Testing and stabilization
- Coding
- Decomposing entities
- Design and test planning
- Specification creation
- Requirements gathering and analysis
- Project development life cycle
- Technical requirements
- Designing World-Ready Applications
- Further reading
- Questions
- Summary
- More operations on atomics
- Designing a lock-free stack
- Operations on atomic types
- Using atomic types
- Designing lock-free data structures
- Implementing a thread-safe stack
- A synchronized increment
- A closer look at data races
- Technical requirements
- Designing Concurrent Data Structures
- Further reading
- Questions
- Summary
- Introducing coroutines
- Designing concurrent code
- Avoiding deadlocks
- Protecting shared data using a mutex
- Sharing data
- Managing threads and sharing data
- Passing arguments to the thread function
- Using std::jthread
- Waiting for threads
- Working with threads
- Threads
- Challenges with processes
- Processes
- Understanding concurrency and multithreading
- Technical requirements
- Concurrency and Multithreading
- Further reading
- Questions
- Summary
- Metaprogramming in functional C++
- Tail recursion
- Head recursion
- Diving deeper into recursion
- Folding
- Higher-order functions
- Pure functions
- Principles of functional programming
- Why use functional programming?
- Using ranges
- Unveiling functional programming
- Technical requirements
- Functional Programming
- Further reading
- Questions
- Summary
- Strings
- Graphs
- Hash tables
- Exploring trees and graphs
- Sorting
- Binary search
- Searching
- Mastering algorithms
- Using iterators in C++20
- Understanding concepts
- Concepts and iterators
- Iterating containers
- Using container adapters
- Using std::vector and std::list
- STL containers
- Containers in memory
- Node-based data structures
- Sequential data structures
- Data structures
- Technical requirements
- Digging into Data Structures and Algorithms in STL
- Section 2: Designing Robust and Efficient Applications
- Further reading
- Questions
- Summary
- Using allocators
- Garbage collection
- std::shared_ptr and std::weak_ptr
- std::unique_ptr
- Leveraging the RAII idiom
- Using smart pointers
- An example of memory management
- The basics of memory management
- Permanent storage
- Main memory
- Cache memory
- Registers
- Understanding computer memory from a higher-level perspective
- Designing a memory storage device
- Understanding computer memory
- Technical requirements
- Memory Management and Smart Pointers
- Further reading
- Questions
- Summary
- Static polymorphism
- Compile-time code optimization
- Compile-time computation
- Exploring template metaprogramming
- Optimizing algorithms using traits
- boost::is_pointer
- boost::is_void
- Type trait implementation
- Exploring traits
- Default template arguments
- Template template arguments
- Template type arguments
- Template non-type arguments
- Template arguments
- Template template parameter
- Type template parameter
- Non-type template parameter
- Template parameters
- Exploring template parameters and arguments
- Examples
- Syntax
- Understanding variadic templates
- Specialization
- Implicit instantiation
- Explicit instantiation
- Instantiation
- Syntax
- Class templates
- Specialization and overloading
- Deduction
- Implicit instantiations
- Explicit instantiations
- Instantiation
- Syntax
- Function templates
- Motivation
- Exploring function and class templates
- Technical requirements
- Understanding and Designing Templates
- Further reading
- Questions
- Summary
- Design patterns
- Virtual functions under the hood
- Polymorphism
- Protected inheritance
- Composition versus inheritance
- Inheritance from the compiler perspective
- Inheritance
- Aggregation and composition
- Class relationships
- Structs in C++
- Encapsulation and the public interface
- Notes on operator overloading
- Rvalue references
- Lvalue references
- Moving objects
- Copying objects
- Initialization and destruction
- Classes from the compiler perspective
- Working with classes
- Mimicking a class
- Behavior
- Identity
- State
- High-level details of objects
- Low-level details of objects
- Understanding objects
- Technical requirements
- Details of Object-Oriented Programming
- Further reading
- Questions
- Summary
- Loops
- Functions as types
- Replacing conditionals with function pointers
- The switch statement
- Conditionals
- Control flow
- Arrays
- The heap
- Memory segments
- Pointers
- Data types
- Addressing
- Virtual memory
- Working with data
- Recursion
- constexpr
- Special properties of main()
- main()
- Program execution
- Technical requirements
- Low-Level Programming with C++
- Further reading
- Questions
- Summary
- Linking libraries
- Introducing Linking
- Platforms and object files
- Machine code generation
- Optimization
- Intermediate code generation
- Semantic analysis
- Syntax analysis
- Tokenization
- Understanding Compiling
- Using modules in C++20
- Header files
- Understanding preprocessing
- Building and running programs
- More C++20 features
- Ranges
- Coroutines
- Concepts
- Introduction to C++20
- Technical requirements
- Introduction to Building C++ Applications
- Section 1: Under the Hood of C++ Programming
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewers
- About the authors
- Contributors
- Why subscribe?
- About Packt
- Dedication
- Expert C++
- Copyright and Credits
- Title Page
- 封面
- 封面
- Title Page
- Copyright and Credits
- Expert C++
- Dedication
- About Packt
- Why subscribe?
- 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
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- Section 1: Under the Hood of C++ Programming
- Introduction to Building C++ Applications
- Technical requirements
- Introduction to C++20
- Concepts
- Coroutines
- Ranges
- More C++20 features
- Building and running programs
- Understanding preprocessing
- Header files
- Using modules in C++20
- Understanding Compiling
- Tokenization
- Syntax analysis
- Semantic analysis
- Intermediate code generation
- Optimization
- Machine code generation
- Platforms and object files
- Introducing Linking
- Linking libraries
- Summary
- Questions
- Further reading
- Low-Level Programming with C++
- Technical requirements
- Program execution
- main()
- Special properties of main()
- constexpr
- Recursion
- Working with data
- Virtual memory
- Addressing
- Data types
- Pointers
- Memory segments
- The heap
- Arrays
- Control flow
- Conditionals
- The switch statement
- Replacing conditionals with function pointers
- Functions as types
- Loops
- Summary
- Questions
- Further reading
- Details of Object-Oriented Programming
- Technical requirements
- Understanding objects
- Low-level details of objects
- High-level details of objects
- State
- Identity
- Behavior
- Mimicking a class
- Working with classes
- Classes from the compiler perspective
- Initialization and destruction
- Copying objects
- Moving objects
- Lvalue references
- Rvalue references
- Notes on operator overloading
- Encapsulation and the public interface
- Structs in C++
- Class relationships
- Aggregation and composition
- Inheritance
- Inheritance from the compiler perspective
- Composition versus inheritance
- Protected inheritance
- Polymorphism
- Virtual functions under the hood
- Design patterns
- Summary
- Questions
- Further reading
- Understanding and Designing Templates
- Technical requirements
- Exploring function and class templates
- Motivation
- Function templates
- Syntax
- Instantiation
- Explicit instantiations
- Implicit instantiations
- Deduction
- Specialization and overloading
- Class templates
- Syntax
- Instantiation
- Explicit instantiation
- Implicit instantiation
- Specialization
- Understanding variadic templates
- Syntax
- Examples
- Exploring template parameters and arguments
- Template parameters
- Non-type template parameter
- Type template parameter
- Template template parameter
- Template arguments
- Template non-type arguments
- Template type arguments
- Template template arguments
- Default template arguments
- Exploring traits
- Type trait implementation
- boost::is_void
- boost::is_pointer
- Optimizing algorithms using traits
- Exploring template metaprogramming
- Compile-time computation
- Compile-time code optimization
- Static polymorphism
- Summary
- Questions
- Further reading
- Memory Management and Smart Pointers
- Technical requirements
- Understanding computer memory
- Designing a memory storage device
- Understanding computer memory from a higher-level perspective
- Registers
- Cache memory
- Main memory
- Permanent storage
- The basics of memory management
- An example of memory management
- Using smart pointers
- Leveraging the RAII idiom
- std::unique_ptr
- std::shared_ptr and std::weak_ptr
- Garbage collection
- Using allocators
- Summary
- Questions
- Further reading
- Section 2: Designing Robust and Efficient Applications
- Digging into Data Structures and Algorithms in STL
- Technical requirements
- Data structures
- Sequential data structures
- Node-based data structures
- Containers in memory
- STL containers
- Using std::vector and std::list
- Using container adapters
- Iterating containers
- Concepts and iterators
- Understanding concepts
- Using iterators in C++20
- Mastering algorithms
- Searching
- Binary search
- Sorting
- Exploring trees and graphs
- Hash tables
- Graphs
- Strings
- Summary
- Questions
- Further reading
- Functional Programming
- Technical requirements
- Unveiling functional programming
- Using ranges
- Why use functional programming?
- Principles of functional programming
- Pure functions
- Higher-order functions
- Folding
- Diving deeper into recursion
- Head recursion
- Tail recursion
- Metaprogramming in functional C++
- Summary
- Questions
- Further reading
- Concurrency and Multithreading
- Technical requirements
- Understanding concurrency and multithreading
- Processes
- Challenges with processes
- Threads
- Working with threads
- Waiting for threads
- Using std::jthread
- Passing arguments to the thread function
- Managing threads and sharing data
- Sharing data
- Protecting shared data using a mutex
- Avoiding deadlocks
- Designing concurrent code
- Introducing coroutines
- Summary
- Questions
- Further reading
- Designing Concurrent Data Structures
- Technical requirements
- A closer look at data races
- A synchronized increment
- Implementing a thread-safe stack
- Designing lock-free data structures
- Using atomic types
- Operations on atomic types
- Designing a lock-free stack
- More operations on atomics
- Summary
- Questions
- Further reading
- Designing World-Ready Applications
- Technical requirements
- Project development life cycle
- Requirements gathering and analysis
- Specification creation
- Design and test planning
- Decomposing entities
- Coding
- Testing and stabilization
- Release and maintenance
- Diving into the design process
- Using SOLID principles
- The single responsibility principle
- The open-closed principle
- The Liskov substitution principle
- The interface segregation principle
- The dependency inversion principle
- Using domain-driven design
- Leveraging design patterns
- The repository pattern
- The factory pattern
- Summary
- Questions
- Further reading
- Designing a Strategy Game Using Design Patterns
- Technical requirements
- Introduction to game design
- Introduction to the Readers and Disturbers game
- Strategy game components
- Interaction between the components
- Designing the game
- Designing character units
- Designing buildings
- Designing game controllers
- Concurrent actions
- The game event loop
- Using design patterns
- The Command pattern
- The Observer pattern
- The Flyweight pattern
- The Prototype pattern
- Designing the game loop
- Summary
- Questions
- Further reading
- Networking and Security
- Technical requirements
- Discovering network programming in C++
- Network applications under the hood
- Programming network applications using sockets
- Network protocols
- Designing a network application
- Using POSIX sockets
- Implementing a POSIX socket wrapper class
- Securing the C++ code
- Securing network applications
- Summary
- Questions
- Further reading
- Debugging and Testing
- Technical requirements
- Understanding the root cause of an issue
- The RCA overview
- Prevention is better than the cure – a good coding behavior
- Uninitialized variable problem
- Side effects in compound expressions
- Mixing signed and unsigned problems
- Order of evaluation problem
- Compile-time checking versus runtime checking
- Avoiding memory leaks
- Debugging C++ programs
- Tools to debug a C/C++ program
- GDB overview
- Examples of GDB
- Setting breakpoints and inspection variable values
- Function breakpoints conditional breakpoints watchpoint and the continue and finish commands
- Logging gdb into a text file
- Practical debugging strategies
- Understanding static and dynamic analysis
- Static analysis
- Dynamic analysis
- Exploring unit testing TDD and BDD
- Unit testing
- TDD
- Example of TDD
- Step 1 – writing a failing test
- Step 2 – developing code to let the test pass
- Step 3 – refactoring
- BDD
- Summary
- Further reading
- Exercises and questions
- Graphical User Interface with Qt
- Technical requirements
- Understanding cross-platform GUI programming
- Using C++ as Java
- Qt's cross-platform model
- Writing a simple application
- Discovering Qt
- Grasping signals and slots
- Understanding Model/View programming
- Using Qt widgets
- Common Qt widgets
- Composing widgets using layouts
- Summary
- Questions
- Further reading
- Section 3: C++ in the AI World
- Using C++ in Machine Learning Tasks
- Technical requirements
- Introduction to AI
- Computer vision
- NLP
- Knowledge reasoning
- ML
- Understanding ML
- Designing an algorithm that learns
- Categories of ML
- Applications of ML
- Neural networks
- Clustering
- Regression analysis
- C++ and ML
- Summary
- Questions
- Further reading
- Implementing a Dialog-Based Search Engine
- Technical requirements
- Understanding the structure of a search engine
- Providing a convenient user interface
- Dealing with typos in queries
- Crawling websites
- Indexing documents
- Tokenizing documents
- Sorting the results
- Building a recommendation engine
- Using a knowledge graph
- Implementing a dialog-based search engine
- Implementing the query parser
- Implementing the query processor
- Summary
- Questions
- Further reading
- Assessments
- Chapter 1
- Chapter 2
- Chapter 3
- Chapter 4
- Chapter 5
- Chapter 6
- Chapter 7
- Chapter 8
- Chapter 9
- Chapter 10
- Chapter 11
- Chapter 12
- Chapter 13
- Chapter 14
- Chapter 15
- Chapter 16
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-06-24 16:34:55