ENGLISH

Mastering C++ Programming Language (Mastering Computer Science)

Book information

Publisher
CRC Pr I Llc
Year
2022
ISBN
1032103213, 9781032103211
Language
english
Format
PDF
Filesize
9 MB (9858662 bytes)
Pages
428\451
Time added
2022-02-13 14:34:07

Description

C++ was created as a superset of C, retaining C's efficiency and notational ease but adding type checking, data abstraction, operator overloading, and object-oriented programming capabilities. C++ is still a popular programming language because of its versatility. Unlike most other programming languages, C++ has been able to adapt as its demands have changed, allowing it to remain relevant, contemporary, and essential. C++, unlike other languages, is flexible and has evolved quickly to meet the demands of programmers and software. It is now one of the most excellent options for rapid applications, with alternatives such as Rust or Perl severely missing ecosystem support for many use cases. More important, C++ is a programming language with varied uses. Knowing how to write code in C++ can help you understand how software and hardware interact. This is valuable information to have regardless of which path you take in technology. If you want to work in technology, C++ is an excellent language to learn. In this book, you will discover a brief introduction to C++, memory management, C++ functions, preprocessing and compilation, coroutines, and lazy generators. Mastering C++ Programming Language: A Beginner's Guide sets the standard for C++ learning while solving the problems given in a typical C++ scenario. This book explores the design, portability, and efficiency of C++ applications in the real world. Mastering C++ Programming Language offers an outstanding supply of tested, usable, and documented C++ code by providing complete, functional solutions to each problem and paying close attention to efficiency and portability. As a beginner's guide, Mastering C++ Programming Language contains several examples and substantial code to aid all programmers who wish to expand their C++ language skills. As a result, Mastering C++ Programming Languageoffers at-length reading for students and professionals interested in the most recent advances in C++. It includes models that are particularly useful for individuals studying the language on their own. Plus, it also discusses the recent updates to the C++ language by comparing different versions and the various standards that are currently in use. Mastering C++ Programming Languageis an ideal beginner's companion for learning the fantastic programming language that is C++. If you are looking to quickly and efficiently learn C++ coding, this is the ultimate book for you! Learn more about our other Mastering titles at: https: //www.routledge.com/Mastering-Computer-Science/book-series/MCS Cover Half Title Series Page Title Page Copyright Page Contents About the Editor CHAPTER 1: Introduction to C++ WHAT IS C++? WHICH IS MORE DIFFICULT TO LEARN: C OR C++? C++ Compilers Are Accessible Which You Can Use to Incorporate and Run USES OF C++ PROGRAMMING FEATURES OF C++ OBJECT-ORIENTED PROGRAMMING LANGUAGE ELEMENTS OF C++ Stage Dependent Mid-Level Programming Language Organized Programming Language Rich Library Memory Management Incredible and Fast Pointers Compiler-Based Language Syntax-Based Language ALL YOU REQUIRE TO KNOW ABOUT OBJECT-ORIENTED PROGRAMMING IN C++ What Is Object-Oriented Programming? Object-Oriented Programming Objects Classes Encapsulation Abstraction Polymorphism Inheritance C++ INSTALLATION Create and Execute a C++ Console Application Project Prerequisites CHAPTER 2: Getting Started With C++ COMPILE AND EXECUTE C++ PROGRAM SEMICOLONS AND BLOCKS Identifiers Keywords COMMENTS DATA TYPES Primitive Built-In Types VARIABLE TYPES VARIABLE DECLARATION Lvalues and Rvalues Are Two Distinct Sorts of Qualities Local Variables Global Level Variables Initializing Local and Global Variables CONSTANTS Boolean Literals Literals of Characters Literals in a String MODIFIER Qualifiers Types STORAGE CLASSES OPERATORS Arithmetic Operators Relational Operators Logical Operators Bitwise Operators Assignment Operators Misc Operators OPERATORS PRECEDENCE LOOP IN C++ Control Statements for Loops Infinite Loop DECISION-MAKING STATEMENTS CONDITIONAL OPERATOR? FUNCTIONS IN C++ Declarations of Functions Making a Function Call Arguments for Functions Parameters Default Values NUMBERS IN C++ Numbers Defining Math Operations ARRAYS STRINGS Character String String Class POINTERS DATE AND TIME BASIC INPUT/OUTPUT DATA STRUCTURES Data Structures of Various Types Data Structures Operations OBJECT ORIENTED Classes and Objects in C++ Class Definitions in C++ C++ Objects Members Having Access to Data Detail on Classes and Objects Inheritance Base and Derived Classes Inheritance and Access Control Types Multiple Inheritance OVERLOADING Overloading Function Overloading Operators Polymorphism Data Abstraction Data Abstraction's Advantages Encapsulation Interfaces HOW TO WORK WITH FILE TAKING CARE OF IN C++? Document Handling in C++ File Handling in C++ THE MOST EFFECTIVE METHOD TO IMPLEMENT DATA ABSTRACTION IN C++ Abstraction in C++ Kinds of Abstraction Benefits of Abstraction HOW TO IMPLEMENT COPY CONSTRUCTOR IN C++? DATA HIDING Encapsulation Abstraction Data Hiding IN C++, HOW DO YOU IMPLEMENT CONSTRUCTORS AND DESTRUCTORS? Constructors and Destructors in C++ Constructor Default Constructor Parameterized Constructor Copy Constructor Destructor Virtual Destructor BASIC INPUT/OUTPUT IN C++ Header Files for the I/O Library (cout) The Standard Output Stream (cin) The Standard Input Stream (cerr) The Standard Error Stream (clog) The Standard Log Stream C++ DATA STRUCTURES Structure Defining Using the Member to Access Structure Members Structures as Function Arguments CHAPTER 3: Working With Numbers and Spaces CHANGING NUMERIC TYPES TO STRING TYPES Changing a String to a Number Changing a Number to a String The First Method Is to Use String Streams The Second Method Is Used to String Function () The Third Method Is Used to Boost Lexical Cast Variable Types and Limitations Are Standard C++ NUMERIC DATA TYPES Types of Primitive Data Derived Data Types User-Defined Data Types C++ Provides the Following Primitive Data Types User-Defined Literals’ Objectives Integers Decimal Floating Points LITERALS SPECIFIED BY THE USER COOKED Literals Specified by the User Cooked Literals LITERALS OF RAW STANDARD USER-DEFINED LITERALS STRING HELPER TEXT HELPER Loading This Helper Available Functions TYPOGRAPHY ASSIST Available Functions URL HELPER Loading This Helper Available Functions XML HELPER Loading This Assistant STD::STRING String Operations Include Functions for Input Functions of Capacity Iterator Methods Functions Manipulation LIBRARY FORMATTING STRING SYNTAX FOR DESIGN FORMAT Some of the Benefits Include EXTENSIBILITY SAFETY LOCALE SUPPORT POSITIONAL ARGUMENTS PERFORMANCE BINARY FOOTPRINT NULL-TERMINATED STRING VIEW FORMAT STRING SYNTAX FORMAT SPECIFICATION MINI-LANGUAGE FORMATTING FUNCTIONS FORMATTING ARGUMENT FORMATTING ARGUMENT VISITATION CLASS TEMPLATE arg_store CLASS TEMPLATE basic_args FUNCTION TEMPLATE make_args FORMATTING CONTEXT FORMATTING BUFFER FORMAT STRING USER-DEFINED TYPES ERROR REPORTING CHAPTER 4: Exploring C++ Functions WHAT IS THE DEFINITION OF A DEFAULTED FUNCTION? WHAT ARE THE LIMITATIONS OF MAKING FUNCTIONS DEFAULT? DELETED FUNCTION WHAT ARE THE BENEFITS OF REMOVING FUNCTIONS EXPLICITLY? WHAT IS LAMBDAS? Expressions Using a Lambda Functor or Function Object Lambdas vs. Functors THE FUNCTION OF A CALLBACK PASSING LAMBDAS AS ARGUMENTS The STL Method, Using a Template Use the std::function STANDARD TEMPLATE LIBRARY ALGORITHM ALGORITHMS FOR MANIPULATION VARIADIC FUNCTION EXPRESSIONS Expressions of Many Kinds Primary Expressions The Following Are Some Examples of Primary Expressions Variadic Templates and Ellipsis Postfix Expressions Arguments Both Formal and Informal Unary Operators in Expressions Binary Operators in Expressions Expressions That Never Change FOLD EXPRESSIONS There Are Two Options Unary Folds Binary Folds Folding Over a Comma FRIEND KEYWORD Function Method Friend Class OVERLOADING A FUNCTION OVERLOADING OF FUNCTION TEMPLATES What Is Legitimate Overloading of a Function Template? FUTURES AND PROMISES Classes for Asynchronous Operations C++ HIGHER ORDER FUNCTIONS Higher-Order Functions Provide the Following Advantages The Function Initialization Is the First Line IMPLEMENTATION MAP CHAPTER 5: Memory Management in C++ MEMORY MANAGEMENT What Is the Purpose of Memory Management? Operators for Memory Management THE NEW OPERATOR’S BENEFITS NEW OPERATOR IN C++ DELETE OPERATOR IS IT PERMISSIBLE FOR A MEMBER FUNCTION TO TELL YOU TO REMOVE SOMETHING? Allocating Memory in a Dynamic Way Arrays’ New and Delete Operators Objects’ New and Delete Operators IN C++, MALLOC() VS NEW So, What’s New? What Exactly Is Malloc()? Differences Between Malloc() and New()? PROCESS MEMORY Operating System Memory Management What Is Main Memory? What Is Memory Management? Why Is Memory Management Necessary? Space for Logical and Physical Addresses Loading Methods: Static and Dynamic Linking, Both Static and Dynamic SWAPPING CONTIGUOUS MEMORY ALLOCATION Memory Allocation Multiple Partition Allocation Fixed Partition Allocation First Fit Best Fit Worst Fit FRAGMENTATION Internal Fragmentation External Fragmentation PAGING WHAT ARE OBJECTS IN MEMORY? OBJECT IN C++ CUSTOM MEMORY MANAGEMENT CUSTOM MEMORY ALLOCATION SMART POINTERS AND MEMORY MANAGEMENT CHAPTER 6: Preprocessing and Compilation THREE STEPS PROCESS COMPILATION OF A BASIC C++ PROGRAM PREPROCESSOR DIRECTIVES IN C++ Preprocessor Directives WHAT IS ENABLE_IF? When Should We Utilize It? enable_if_all/enable_if_any is_detected WITH A VAST VARIETY OF CHOICES FOR OVERLOAD RESOLUTION enable_if Class TO BUILD A MEMBER FUNCTION CONDITIONALLY, USE std::enable_if USING ENABLE_IF TO COMPILE CLASSES AND FUNCTIONS ON A CONDITIONAL BASIS Making Preparations How Does It Work? How Does It Work? ATTRIBUTES IN C++ The Purpose of Attributes in C++ SINCE C++11, THE FOLLOWING HAS CHANGED DIFFERENCES BETWEEN C++ AND C# CHARACTERISTICS ATTRIBUTES IN METADATA PROVIDING METADATA TO THE COMPILER WITH ATTRIBUTES How To Do It How Does It Work? CHAPTER 7: Coroutines and Lazy Generators WHAT ARE C++ COROUTINES? co_await Restrictions Execution HEAP ALLOCATION Promise How May a Coroutine Acquire Its Promise Object Within Counter? co_await co_wait expr The Coroutine Return Object Is As Follows co_yield co_return Operator WHAT ARE GENERATORS? Generic Generators Greedy Generator Lazy Generator std::generator: Ranges Synchronous Coroutine Generator Motivation Design Header Value Type Can Be Specified Separately Recursive Generator elements_of SYMMETRIC TRANSFER What Is the Best Way to Store the Delivered Value in a Promise Type? Support for Allocators Is It Possible to Postpone Adding Allocator Support for Later? EXPERIENCE AND IMPLEMENTATION PERFORMANCE AND BENCHMARKS COMPILING CODE WITH COROUTINES HANDLES FOR COROUTINES COROUTINES AND C++ FOR EFFECTIVE ASYNC MEETING THE NEEDS OF ASYNC COMPLETION HOW TO MAKE THEM ASYNC OBJECTS APPRAISAL INDEX

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

2008 · PDF