C++ through Examples
Book information
Description
This book is about the C++ programming language. If you have no (or little) experience in C++, if you want to succeed in programming in C++, and if you are ready to study hard, then the book is for you.The book consists of specially selected examples and problems. They cover all main subjects essential for programming in C++.The first chapter gives a general notion of what we can do in C++. There we learn how to create a program. The chapter also contains information about input and output operators, variables, functions, loop statements, conditional statements, and arrays.The second chapter is devoted to the control statements. In this chapter, we consider in detail the conditional statement, loop statements, the selection statement. We also will get a notion about handling and throwing exceptions.In the third chapter, we discuss pointers, arrays, and references. Namely, we consider how to create and use pointers. We discuss the relationship between pointers and arrays, and also we investigate how and when we can use references. Moreover, the chapter contains information about memory allocation. As well, there we analyze the peculiarities of character arrays used to implement strings.The fourth chapter is about functions. There we learn what a function can do and how we can use it. We overload functions, define the arguments with default values, and use recursion. We will get to know how arguments are passed to functions and how we pass a function as an argument. Also, we learn how functions operate with arrays, references, and pointers.In the fifth chapter, we discuss the principles of object-oriented programming. We learn how to describe classes and create objects. Also, the chapter contains information about public and private members, constructors and destructors, overloading methods and operators, using inheritance.In the sixth chapter, we continue discussing classes and objects. Namely, we get familiar with pointers to objects, arrays of objects, and functors. We will use objects whose fields are arrays and implement object indexing. We will get familiar with virtual methods and multiple inheritance, and do some other tricks with classes and objects.In the seventh chapter, we investigate template functions and classes. There we create and overload template functions with several parameters. We will come to know how to define default values for template parameters. There we also apply inheritance for template classes. Moreover, in the chapter, we consider how to use integer template parameters.In the eighth chapter, we consider different programs. The chapter explains how to use structures, complex numbers, and containers. We will also get familiar with multithreading.The ninth chapter is devoted to mathematical problems. In that chapter, we show how to implement methods for solving algebraic and differential equations, calculate integrals, and create interpolation polynomials. Contents Introduction. The Book about С++ Chapter 1. Simple Programs Chapter 2. Control Statements Chapter 3. Pointers, Arrays, and References Chapter 4. Functions Chapter 5. Classes and Objects Chapter 6. Using Object-Oriented Programming Chapter 7. Template Functions and Classes Chapter 8. Different Programs Chapter 9. Mathematical Problems Conclusion. Some Advice
Similar books
PHP by Example: A Practical Guide to Creating Web Applications with PHP
2024 · PDF
PHP by Example: A Practical Guide to Creating Web Applications with PHP
2024 · PDF
C++20 in Examples.
2021 · PDF
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
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