• EOL

C ++ language. Programming school. Edition VI - Stephen Prata

Index: KSZ-02181

Publisher: Helion. Translation: Przemysław Szeremiota. Based on "C++ language. School of programming. Edition V." The book is a thorough guide to programming in C++ language. Hard-covering position.

C ++ language. Programming school. Edition VI - Stephen Prata
€20.40
€19.43 tax excl.
Unavailable
Discontinued product
PayPal payment
Manufacturer: Helion

Attention!

Book replaced by a new edition - check it out!

Description

The book is a programming guide in C++. The author discusses the basic concepts and techniques of programming in a clear and thorough way. By presenting subsequent issues, from structural code, through classes and inheritance, to intelligent indicators, he delves into the secrets of effective programming in C++.

The chapters are concluded with check questions with answers and programming exercises on the subject.

This edition has been extended by introducing new elements introduced in C++11.

Thanks to the information contained in the book:

  • you will learn about new elements of the language, introduced in C++ 11 standard
  • you will pass a programming course in C++
  • you will find the information you need for your daily work in no time at all
  • you can master C++

Sample projects used in the book are availablefor download. Fragment of the book toread on-line.

Table of contents

Thanks (19)

Introduction (21)

Chapter 1: We begin (31)

  • Learning C++ - what awaits us? (31)
  • Origin of C++ - short story (32)
    • Language C (32)
    • Programming philosophy in C (33)
    • Change to C++ - object-oriented programming (34)
    • C++ and generalised programming (35)
    • Origin C++ (36)
  • Portability and standards (37)
    • Language development in numbers (38)
    • C++ standards in this book (39)
  • Programming mechanics (39)
    • Source code writing (40)
    • Compilation and consolidation (41)
  • Summary (45)

Chapter 2 First programme in C++ (47)

  • C++ - beginning (47)
    • Functional features of main() (49)
    • Comments in C++ (51)
    • Preprocessor and iostream file (52)
    • Header file names (53)
    • Name spaces (53)
    • Data output - cout (55)
    • Source code formatting C++ (57)
  • Instructions C++ (59)
    • Declaration instructions and variables (60)
    • Assignment instruction (61)
    • New cout trick (62)
  • Other instructions C++ (62)
    • Use of cin object (63)
    • Cout connection (64)
    • cin and cout - first time classes (64)
  • Functions (66)
    • Use of the value return function (66)
    • Functional variations (69)
    • User-defined functions (70)
    • User functions returning value (73)
    • Directive for use in multi-functional programmes (74)
  • Conclusion (76)
  • Checking questions (77)
  • Programming exercises (77)

Chapter 3 Data (79)

  • Straight variables (80)
    • Names of variables (80)
    • Total number types (81)
    • Types short, int, long and long long (82)
    • Unsigned types (87)
    • Choosing the right type (89)
    • Total number letters (90)
    • How does C++ determine the type of constant? (91)
    • Type char - characters and small integers (92)
    • Bool data type (100)
  • Const qualifier (100)
  • Floating point numbers (101)
    • Record of floating point numbers (102)
    • Variable-point data types (103)
    • Variable point fixtures (105)
    • Advantages and disadvantages of floating point numbers (105)
  • Arithmetic operators C++ (106)
    • Sequence of activities - operators' priorities and communications (107)
    • Dividing varieties (108)
    • Operator modulo (110)
    • Type conversions (110)
    • Automatic type declarations in C++11 (116)
  • Summary (117)
  • Checking questions (117)
  • Programming exercises (118)

Chapter 4 Complex types (121)

  • Brief tables (122)
    • Comments on the scheme (124)
    • Initialisation of tables (124)
    • Initialisation of tables in C++11 (125)
  • Chains (126)
    • Subtitling combination (127)
    • Chains in table (128)
    • Problems with the introduction of marker chains (129)
    • Loading of character strings in rows (130)
    • Mixing in the input data of strings and numbers (134)
  • Class string - introduction (135)
    • Initialisation of sign strings in C++11 (136)
    • Assignment, concatenation and attachment (136)
    • Other string class operations (138)
    • Class a string a input and output (139)
    • Other types of lettering (141)
  • Structures (142)
    • Use of structure in the programme (143)
    • Initialisation of structures in C++11 (145)
    • Is it possible to use a string field in the structure? (146)
    • Other features of structures (146)
    • Structure tables (148)
    • Bitfields (149)
  • Unie (149)
  • Calculation types (151)
    • Setting enumerator values (153)
    • Ranges of values in calculation types (153)
  • Indicators and various trinkets (154)
    • Declaration and initialisation of indicators (156)
    • Risks associated with indicators (158)
    • Indicators and figures (159)
    • Use of the new operator for memory allocation (159)
    • Memory release with delete (161)
    • Using new to create dynamic tables (162)
  • Indicators, tables and arithmetic (165)
    • Summary information on indicators (168)
    • Indicators and chains (170)
    • Using new to create dynamic structures (174)
    • Memory allocation: automatic, static and dynamic (177)
  • Type combinations (179)
  • Tables otherwise (181)
    • Template class vector (181)
    • Array template class (C++11) (182)
    • Comparison of tables with vector and array objects (183)
  • Summary (184)
  • Checking questions (185)
  • Programming exercises (186)

Chapter 5 Loops and relational expressions (189)

  • Loops for (190)
    • Loop elements for (191)
    • Back to the loop for (196)
    • Change of step size (198)
    • Loop for and marker chains (198)
    • Incrementation (++) and decrementation (--) operators (199)
    • Side effects and reference points (200)
    • Prefix forms and suffix forms (201)
    • Incrementation and decontamination operators and indicators (202)
    • Complex attribution operators (203)
    • Complex instructions, or blocks (203)
    • Comma as operator (and some syntactic tricks) (205)
    • Expressions of relationship (208)
    • Assignments, comparisons and errors (208)
    • Comparing chains in style C (210)
    • Comparison of string class objects (213)
  • Loop while (213)
    • Observations on the programme (215)
    • Loop for a loop while (216)
    • Wait a minute. We're creating a delay loop (217)
  • Loop to while (219)
  • Range for (C++11) loops (221)
  • Loops and text input (221)
    • The simplest cin version (222)
    • cin.get(char) for relief (223)
    • Which version of cin.get() is better? (224)
    • End of file (224)
    • Another version of cin.get() (227)
  • Nested loops and two-dimensional boards (230)
    • Two-dimensional tables initialization (232)
    • Use of two-dimensional tables (232)
  • Summary (234)
  • Checking questions (234)
  • Programming exercises (235)

Chapter 6 Conditional instructions and logical operators (237)

  • If (237) instruction
    • Instruction if else (239)
    • Formatting instructions if else (241)
    • Construction if else if else (241)
  • Logical expressions (243)
    • Logical alternative operator - || (243)
    • Logical operator - &&& (245)
    • Scope determination by operator && (247)
    • Logical negation operator - ! (248)
    • About logical operators (250)
    • Alternative recording (251)
  • Cctype library (251)
  • Operator? (253)
  • Switch instructions (255)
    • Use of enumerators as labels (258)
    • switch versus if else (259)
  • Break and continue instructions (259)
    • Comments on the scheme (261)
  • Loops to load numbers (262)
    • Comments on the programme (264)
  • Simple Input/Output from File (265)
    • Text input-output and text files (265)
    • Save to text file (267)
    • Reading data from a text file (270)
  • Summary (274)
  • Checking questions (275)
  • Programming exercises (276)

Chapter 7 Functions - program components in C++ (279)

  • Functions at a glance (280)
    • Definition of functions (281)
    • Prototyping and calling functions (283)
  • Function parameters and transmission by value (286)
    • Many parameters (287)
    • One more two-argument function (289)
  • Functions and tables (291)
    • How do indicators allow the creation of array-processing functions? (292)
    • Effects of using tables as parameters (293)
    • Additional examples of functions and tables (295)
    • Functions using the range of tables (301)
    • Indicators and modifier const (302)
  • Two-dimensional functions and tables (306)
  • C-style functions and chains (307)
    • Functions with C-style chains as parameters (307)
    • Functions returning strings in C format (309)
  • Functions and structures (310)
    • Transmission and return of structures (311)
    • Another example of using functions and structures (312)
    • Forwarding structure address (317)
  • Thumbclass functions and objects (318)
    • Array functions and objects (320)
    • Comments on the programme (321)
  • Competition (322)
    • Single call recurrence (322)
    • Multiple call recurrence (324)
  • Indicators per function (325)
    • Indicators for functions - basics (325)
    • Example of the use of indicators for functions (327)
    • Variations on function indicators (329)
    • Simplification by typedef (333)
  • Summary (333)
  • Checking questions (334)
  • Programming exercises (336)

Chapter 8 Functions - Advanced issues (339)

  • Inline functions (339)
  • Reference variables (342)
    • Creation of a reference variable (342)
    • References as function parameters (345)
    • Reference properties (348)
    • Use of structure references (352)
    • Use of object references (358)
    • Secondary objects - objects, inheritance and references (361)
    • When to use references as parameters? (364)
  • Default parameters (365)
    • Comments on the programme (366)
  • Function overload (367)
    • Example of function overload (370)
    • When to use the function overload? (372)
  • Function templates (372)
    • Overloaded templates (375)
    • Template limitations (377)
    • Non-confidential specialisations (377)
    • Specifications and specialisations (380)
    • Which version of the function will the compiler choose? (382)
    • Evolution of function templates (388)
  • Summary (392)
  • Checking questions (392)
  • Programming exercises (393)

Chapter 9 Memory model and namespaces (397)

  • Detachable compilation (397)
  • Life time, range and connection (403)
    • Range and connection (404)
    • Automatic allocation (404)
    • Static variables (409)
    • Static allocation, external linking (411)
    • Specificators and qualifiers (419)
    • Combination and functions (421)
    • Linguistic combination (422)
    • Allocation categories and dynamic allocation (423)
  • Name spaces (429)
    • Traditional C++ namespace (429)
    • New namespace mechanisms (431)
    • Name spaces - example (438)
    • The future of namespaces (441)
  • Summary (442)
  • Checking questions (442)
  • Programming exercises (445)

Chapter 10 Facilities and classes (447)

  • Procedural and object-oriented programming (448)
  • Classes and abstractions (449)
    • What's the type? (449)
    • Classes in C++ (450)
    • Implementation of class methods (455)
    • Application of classes (459)
    • Changes in implementation (461)
    • Summary of known messages (462)
  • Builders and destroyers (463)
    • Declaring and defining constructors (464)
    • Use of constructors (465)
    • Default constructors (466)
    • Destructors (467)
    • Stock class improvements (468)
    • Constructors and destructors - summary (475)
  • Object identity - this indicator (476)
  • Object tables (482)
  • Class range (485)
    • Fixed class coverage (486)
    • Calculation with own range (C++11) (487)
  • Abstract data types (488)
  • Summary (492)
  • Checking questions (493)
  • Programming exercises (493)

Chapter 11 Application of classes (497)

  • Overloading of operators (498)
  • One, two, three - operator overload test (499)
    • Additional adding operator (502)
    • Overload limits for operators (505)
    • Still about overloading operators (506)
  • Friends most important (509)
    • Declaration of friendship (510)
    • Typical friendship - operator overload << (512)
  • Overloading of operators - methods versus non-contributory functions (518)
  • Overloads continued - class Vector (519)
    • Object state coding component (526)
    • Overload of arithmetic operators for Vector class (528)
    • Implementation note (530)
    • Vectorial random wandering (530)
  • Automatic conversion and projection of class types (534)
    • About the programme (539)
    • Conversion functions (539)
    • Conversion and friendship (544)
  • Summary (547)
  • Checking questions (549)
  • Programming exercises (549)

Chapter 12 Classes and dynamic memory allocation (553)

  • Classes and dynamic memory (554)
    • Repetition from dynamic memory and static components of classes (554)
    • Special class methods (562)
    • What's the problem with the copying engineer in Stringbad? (565)
    • Further weaknesses of Stringbad: assignment operators (568)
  • New improved class - String (571)
    • New version of the default builder (572)
    • Thrust comparison (573)
    • Thrust indexing (574)
    • Class static methods (575)
    • Further overload of the assignment operator (576)
  • What should be kept in mind when using new in constructors? (581)
    • Recommendations and cautions (582)
    • Copying of objects component by component (583)
  • Steam words about returning objects (584)
    • Returning an unmodifiable (const) object reference (584)
    • Returning a modifiable (non-const) object reference (585)
    • Returning an object by value (585)
    • Return by unmodified object value (const) (586)
  • Facility indicators (587)
    • Still about new and delete (589)
    • Object indicators - summary (590)
    • Still about the local new version (592)
  • Repetition of learned techniques (596)
    • Operator overload << (596)
    • Conversion functions (597)
    • Classes using new in construction (597)
  • Simulation of the queue (598)
    • Queue class (598)
    • Customer class (609)
    • ATM simulation (612)
  • Summary (616)
  • Checking questions (617)
  • Programming exercises (619)

Chapter 13 Classes and succession (623)

  • Simple base class (624)
    • Inheritance (626)
    • Designers - access level issues (628)
    • Use of derivative class (631)
    • Relation between the derived and the base class (633)
  • Inheritance - relationship is something (635)
  • Polymorphic public succession (636)
    • Creating Brass and BrassPlus classes (637)
  • Static and dynamic bonding (648)
    • Compliance of indicator and reference types (648)
    • Virtual methods and dynamic bonding (650)
    • What do you need to know about virtual methods? (653)
  • Access control - protected level (656)
  • Abstract base classes (657)
    • Use of abstract base classes (659)
    • Philosophy of abstract base classes (665)
  • Inheritance and dynamic memory allocation (665)
    • First case - derivative class without dynamic memory allocation (665)
    • Second case - derived class with dynamic memory allocation (666)
    • Example of inheritance using dynamic memory allocation and befriended functions (668)
  • Class design - overview (673)
    • Methods automatically generated by compiler (673)
    • Other methods (675)
    • Public succession (678)
    • Class methods - summary (682)
  • Summary (683)
  • Checking questions (683)
  • Programming exercises (684)

Chapter 14 Repeated use of the code in C++ (687)

  • Classes with object components (688)
    • Brief characteristics of the valarray class (688)
    • Student class project (689)
    • Example class Student (691)
  • Private succession (697)
    • New version of the Student class (697)
  • Multiple inheritance (706)
    • Doubles of the Worker class (711)
    • Dual methods (714)
    • Overview of multiple successions (723)
  • Class templates (724)
    • Defining a class template (724)
    • Using a class template (727)
    • Class template analysis (729)
    • Table template and non-standard arguments of the template (734)
    • Flexibility of templates (736)
    • Template specialization (739)
    • Templates as components (742)
    • Templates as parameters (744)
    • Class templates and friendship (746)
    • Template type aliases (C++11) (752)
  • Summary (753)
  • Checking questions (755)
  • Programming exercises (757)

Chapter 15 Friendship, exceptions and more (763)

  • Friendship (763)
    • Friendly classes (764)
    • Friendly class methods (768)
    • Other relations of friendship (771)
  • Nested classes (773)
    • Access to nested classes (774)
    • Nesting in a template (776)
  • Exceptions (779)
    • Calling the abort() function (779)
    • Return error code (780)
    • Exception mechanism (782)
    • Exceptions in the form of objects (784)
    • Exception specifications a C++11 (788)
    • Pile development (789)
    • Other characteristics of the exceptions (793)
    • Exceptional class (796)
    • Exceptions, classes and inheritance (799)
    • Problems with exceptions (804)
    • Careful with exceptions (807)
  • RTTI (808)
    • Why do we need RTTI? (808)
    • How does RTTI work? (809)
  • Type projection operators (816)
  • Summary (820)
  • Checking questions (820)
  • Programming exercises (822)

Chapter 16 Thong class and STL library (823)

  • Thong class (823)
    • Create string object (824)
    • Entering data into string objects (828)
    • Use of string objects (830)
    • What else does thong class offer? (835)
    • Thong class variants (837)
  • Smart indicator class templates (837)
    • Use of smart indicators (838)
    • More about smart indicators (841)
    • Unique_ptr over auto_ptr (844)
    • Choice of smart indicator (845)
  • STL library (847)
    • Template class vector (847)
    • Vector class methods (849)
    • Other vector class options (853)
    • Range Loops for (C++11) (857)
  • Generalised programming (858)
    • What do you need iterators for? (858)
    • Types of iterators (862)
    • Hierarchy of iterators (865)
    • Concepts, clarifications and models (866)
    • Types of containers (872)
    • Association containers (881)
    • Disorderly association containers (C++11) (887)
  • Functional objects (functors) (887)
    • Concepts related to functionaries (888)
    • Pre-defined functions (891)
    • Adaptable functions and function adapters (892)
  • Algorithms (895)
    • Algorithm groups (895)
    • General algorithm properties (896)
    • STL library and string class (897)
    • Functions and methods of containers (898)
    • Use of the STL library (899)
  • Other libraries (903)
    • Classes vector, valarray and array (903)
    • Template initializer_list (C++11) (908)
    • Using the template initializer_list (910)
    • Comments on the scheme (911)
  • Conclusion (911)
  • Checking questions (913)
  • Programming exercises (914)

Chapter 17 Input, output and file handling (917)

  • General characteristics of C++ I/O operation (918)
    • Streams and buffers (919)
    • Streams and buffers a file iostream (921)
    • Redirection (923)
  • Execution of exit operations using the cout object (924)
    • Overloaded operator << (924)
    • Other methods of the ostream class (927)
    • Emptying the output buffer (930)
    • Output data formatting with cout object (931)
  • Execution of entry operations using the cin facility (945)
    • How does the operator >> of the cin object "see" the input data? (947)
    • Stream states (949)
    • Other istream class methods (953)
    • Other istream class methods (960)
  • File input/output (964)
    • Simple file input/output operations (965)
    • Stream control and is_open() method (968)
    • Opening multiple files (969)
    • Processing of command line arguments (969)
    • File opening modes (971)
    • Free access (981)
  • Internal formatting (988)
  • Summary (991)
  • Checking questions (992)
  • Programming exercises (993)

Chapter 18 New standard C++ (997)

  • Summary of the elements concerned C++11 (997)
    • New types (997)
    • Uniform initialization (998)
    • Declarations (999)
    • nullptr (1001)
    • Smart indicators (1002)
    • Amendments to the exception specification (1002)
    • Open range of calculation elements (1002)
    • Changes in classes (1003)
    • Template and STL library changes (1004)
    • R-value references (1006)
  • Transfer semantics and r-value references (1007)
    • Need for transfer semantics (1007)
    • Example of transfer (1008)
    • Transferring constructor - conclusions (1013)
    • Footnotes (1014)
    • Forced transfer (1015)
  • New class elements (1018)
    • Special class methods (1018)
    • Default and deleted methods (1019)
    • Delegation of designers (1021)
    • Inheritance of constructors (1021)
    • Management of virtual methods: ovverride and final (1023)
  • Lambda functions (1024)
    • Indicators for functions, functions and lambda (1024)
    • Why do we need lambdy? (1027)
  • Adapters (1030)
    • Adapter function vs. template inefficiency (1030)
    • Problem repair (1032)
    • Further possibilities (1034)
  • Templates with variable number of parameters (1035)
    • Template and function parameter packages (1035)
    • Unpacking of packages (1036)
    • Rivalry in templates with variable number of parameters (1037)
  • Other facilities C++11 (1040)
    • Simultaneous programming (1040)
    • Library additions (1040)
    • Low-level programming (1041)
    • Others (1042)
  • Language changes (1042)
    • Project Boost (1043)
    • TR1 (1043)
    • Use of Boost libraries (1043)
  • What's next? (1044)
  • Summary (1045)
  • Checking questions (1046)
  • Programming exercises (1049)

Appendix A Numerical systems (1051)

  • Decimal numbers (base 10) (1051)
  • Total numbers in eight (base 8) (1051)
  • Hexadecimal numbers (1052)
  • Binary numbers (base 2) (1052)
  • Binary and hexadecimal notation (1053)

Appendix B C++ reserved words (1055)

  • C+++ key words (1055)
  • Alternative lexames (1056)
  • C+++ reserved names of language libraries (1056)
  • Special meaning identifiers (1057)

Appendix C ASCII character set (1059)

Appendix D Priorities of operators (1063)

Appendix E Other operators (1067)

  • Bit operators (1067)
    • Shift operators (1067)
    • Bit Logic Operators (1069)
    • Alternative representation of bit operators (1071)
    • Several typical techniques using bitstream operators (1072)
  • Pull-out operators (1073)
  • alignof (C++11) (1077)
  • noexcept (C++11) (1078)

Appendix F Template class string (1079)

  • Thirteen types and fixed (1080)
  • Data information, constructors and various trinkets (1080)
    • Default builder (1083)
    • Designers operating on classic C-chains (1083)
    • Structures operating on fragments of chains C (1084)
    • Designers operating on l-value reference (1084)
    • Designers operating on r-value reference (C++11) (1085)
    • Constructors using n copy of mark (1086)
    • Scope based constructors (1086)
    • Designer operating on initialization list (C++11) (1086)
    • Memory management methods (1087)
  • Access to the chain (1087)
  • Simple assignment (1088)
  • Searching for chains (1089)
    • Find() function family (1089)
    • Function family rfind() (1089)
    • Find_first_of() function family (1090)
    • Find_last_of() function family (1090)
    • Find_first_not_of() function family (1091)
    • Find_last_not_of() function family (1091)
  • Comparison methods and functions (1091)
  • Chain Modifiers (1093)
    • Attachment and addition methods (1093)
    • Other imputation methods (1094)
    • Insertion methods (1094)
    • Disposal methods (1095)
    • Replacement methods (1095)
    • Other modifying methods: copy() and swap() (1096)
  • Input and output (1096)

Appendix G Methods and functions from the STL library (1099)

  • STL a C++11 (1099)
    • New containers (1099)
    • Changes in C++98 containers (1100)
  • Components common to all (or most) containers (1101)
  • Additional components for sequential containers (1104)
  • Additional harvest and map operations (1107)
  • Disorderly association containers (C++11) (1109)
  • Functions of the STL (1111)
    • Non-modifying sequential operations (1111)
    • Mutant sequential operations (1116)
    • Sorting and related operations (1125)
    • Numerical operations (1139)

Appendix H Selected book items and Internet resources (1141)

  • Selected book items (1141)
  • Internet resources (1142)

Appendix I ANSI/ISO C++ (1145)

  • Avoiding abuse of certain pre-processor directives (1145)
    • To define constants it is better to use the const modifier than the #define directives (1145)
    • It is better to use the inline specifier than the #define (1147) macrodefinition to define small functions.
  • Use of prototypes of functions (1148)
  • Use of type projection (1148)
  • Learning and using C++ language mechanisms (1149)
  • Using the new header file organization (1149)
  • Use of namespace (1149)
  • Use of smart indicators (1150)
  • Use of thong class (1151)
  • Use of the STL library (1151)

Appendix J Answers to the follow-up questions (1153)

Scorch (1179)

Package width 0.001 cm
Package height 0.001 cm
Package depth 0.001 cm
Package weight 0.001 kg

Be the first to ask a question about this product!

Customers who bought this product also bought:

Products from the same category: