Learning the C++ programming language. In this course, we will learn C++ from scratch. Lessons for beginners and knowledgeable in this language. We will go through all the steps from simple variables to complex applications of OOP (Object Oriented Programming)

Video lesson:

Useful links:
The C++ language appeared back in 1983. It is based on the C language, but featured new features that greatly simplified the creation of applications and introduced many new concepts such as: OOP (creating classes and objects), inheritance, freeing and deleting memory (new and delete), virtual functions, exceptions, and many other innovations.

Language C++ got its name from the C language, but with the addition of ++ , as it means increment (increment by one). Thus, it inherits all the principles of the classical C language, but with new very useful additions.

Training in previous positions. More than 80 lectures at home and abroad, including guest lectures at the universities of Aarhus, Bielefeld, Düsseldorf, Essen, Freiburg, Graz, Hamburg, Heidelberg, Helsinki, Joensuu, Mainz, Münster, Odense, Paris, Siegen, Tampere, Turku, Vaasa, Vein.

Publications

An excellent guide to the best strategies for beginners, advanced and professionals. Hamburg: Helmut Buske. A guide to academic writing in and out of research. Bremen: University Publisher. Kent, Ohio: Kent Press Release state university.

Interesting fact: The C language is still popular, despite the fact that the C++ language has been around for a very long time and is much better than the C language. This is due to the fact that many programs were written in the C language and the transition to more new language difficult.

Many people advise you to learn C first before C++, but you really shouldn't. If you start learning C++ right away, you will gain knowledge from a newer language and switching to an older language will not be difficult at all. And it is not known whether it will be necessary to make a transition to an older language at all, most likely not.

P: What goes on in the minds of translators. empirical research structures of the translation process for advanced French learners. Bremen Symposia on Teaching and Teaching Foreign Languages ​​in Universities. Bremen Symposium on the Study of an Autonomous Foreign Language.

Trier: Scientific publisher Trier. Interdisciplinary review of research. P: How does the study of language learning become the practice of language teaching? Questions - Concepts - examples. P.: Pathways to Labyrinths - An overview of research questions and methods in the study of translation processes.

But if you still want to learn C before the C++ language, then we suggest that you familiarize yourself with a large video lesson in which you can get acquainted with this language:


C++ is one of the most popular programming languages ​​in the world. On it, you can create all kinds of programs for Windows and Mac, build websites, and also create games.

P: Wednesday is not a message. - To develop courses on e-learning foreign language. Contribution to the study of teaching and learning foreign languages. P: How much science do technical writers need? Communication between science and practice in the field of technical documentation.

Odense Working materials in language and communication. Odense: Institute of Language and Communication. P .: Black marks on a white background. Review of issues, methods and results of the study of the writing process. In: Seminar on the Study of Language Teaching: Problems and Prospects for the Study of Language Teaching.


To work with C++, you need to install a development environment. You can install any environment convenient for you or even use the online compiler. Among the most popular development environments are: Visual C++, Xcode (Mac only), GCC, Intel C++ Compiler, Embarcadero (Borland) C++ Builder.

Homework for the video lesson

What is C++?

What is C++ used for and what functions can it perform?

View answer

C++ is a cross-platform programming language that is used to build applications, websites, games, and many other things. Due to its early appearance, it has been used in many areas related to programming.

Bochum's contribution to the teaching of foreign languages ​​in research and teaching. In this article, we will try to answer the most common questions that will help you better compare languages ​​and make learning decisions. Well, as always, the answer depends on many factors, but mainly on what kind of events you plan to perform in the future.

What is easier to know?

The reason is that by not having the old applications to support you, you have the luxury of only working with the new language, not counting the legacy code. If you are going to work for a company, it is almost mandatory that you learn both languages. Also, even if your new company starts from scratch, it's more than likely that you won't stay with it for the rest of your life, and the next one will most likely have a legacy code. Today it is still difficult. There is often a confusion here of two concepts that have nothing in common: one thing is that Swift is easier to write and read, and the other is completely different, which is easier to learn.

Development environment

Stephan R. Davies “C++ for Dummies” Dialectics, 2007, 384 pages, 5th edition, (18.6 mb. pdf)

For dummies, literally “beginner's guide to the C++ programming language”. The main difference between the 5th edition and the previous ones is that it is really designed for beginners who are not familiar with programming. In previous editions, the reader was required to have a basic knowledge of the C language. from the basics of the C ++ language, the concept of the language paradigm and the study of syntax.

For example, anything related to additional meanings and usage? and! to indicate your intentions. This may sound bad and makes learning difficult, but it really isn't. And it's harder to learn. It can be easily seen with real example: matrices. In the first case, an error will occur if you try to change the matrix, and in the second case, the intent will be cleared from the name, so it's much simpler and less error prone. But that doesn't mean it's harder to learn, but it could only mean the opposite.

Therefore, if this part is covered, you just need to learn the language. And you can use almost everything you already know. Yes Yes; in both cases, which reinforces the thesis that it is good to know two languages. While it is true that some of these questions are somewhat esoteric and will not matter in Everyday life, it is always recommended to use a wider range of tools.

The book consists of 6 parts, but thematically it can be divided into three: the introductory part, as already mentioned - introductory, the second - functional programming, as the basis for OOP and the third - object-oriented programming (which actually differs from C and what is its strength ). Despite the fact that the C ++ language cannot be called simple, the material in the book is quite accessible and quite informative.

From the outset, as can be deduced from the foregoing, it would be desirable that you study both. Safer to develop as it hides more complexity and manages memory automatically. Testing is easier thanks to playgrounds.

  • It is easier to write and read, and the code is more concise.
  • It's easier to maintain.
  • Your applications will run faster.
We hope that these questions and their answers will help you make your decision in a particular language.

Learning a foreign language while you sleep: what does the science say?

There are a number of misconceptions about learning foreign languages. These include the ability to learn foreign languages ​​through sleep or hypnosis. Various studies have been carried out on the activity of the brain during sleep, as well as its ability to learn during this period of rest, which is necessary for each person. Focus on the results of two of them.

The author made a teaching emphasis on the questions - “why” and “how” in general, certain language constructions work. The book provides many concrete examples, both in a few lines of code, and the code of fully completed working programs. If you put the effort and perseverance into studying this initial guide, then it is quite possible that by the end of studying the book you will be able to write intelligible (understandable to you - why and how they work) programs.

Memory and sleep: what the brain can do

If we believe in science, the brain will not completely stop during sleep and will even be able to hold everything. After several nights in a row listening to the noises, the subjects remembered the noise and were able to recognize it when they woke up. These results, even if they are associated with meaningless noises, nevertheless remain interesting for the future, because they show that the brain is able to record information during sleep. This study focused on learning Dutch from 60 German speakers.

If so, then you can proceed to the study of more “advanced” literature. The book will be of interest to students who begin to learn programming in C ++ and for independent initial learning.
ISBN 978-5-8459-0723-3 (Russian)

Part 1. Getting Started with C++ 23

Chapter 1. Writing your first program 25
Understanding C++25 Concepts
What is program 26
How programs are written 26
Installing Dev-C++ 27
Dev-C++30 setup
Creating your first program 31
Enter code 32
Building Your Program 34
Program execution 36
Dev-C++ is not Windows 36
Help in Dev-C++ 36
Program analysis 36
Determining the Structure of C++37 Programs
Use in source code - comments 37
Using instructions in programs 38
Ads 38
Output generation 39
Expression evaluation 39
Saving expression results 39
Convert Review Continues… 40

The study was carried out as follows. The students had to memorize pairs of vocabulary words starting at 22:00. Then part of the group fell asleep while listening to the recording of the words, which were to be held at a moderate level, while the other side had to watch and listen to the vocabulary. Sleeping subjects woke up after 3 hours and had better results than the other group during the vocabulary restitution phase. Sleep, if not used in this case to learn something new, has played a significant role in vocabulary memorization.

Considering the results of these various studies, it is clear that the brain is capable of acquiring freshly learned vocabulary and simple unknown cues during sleep. However, it has not yet been established that the brain is capable of learning all of language and its intricacies during sleep. Nothing now replaces active learning for effective promotion.

Chapter 2 Variable declaration tricks 41
Declaring Variables 41
Ad different types variables 42
Restrictions on Integers in C++43
Rounding to integers 43
Range Limits 43
Solving the problem of truncation of the fractional part 44
Floating Point Restrictions 44
Listing 44
Calculation speed 45
Loss of precision 45
Range limited 45
Variable type declarations 45
Constants 47
Special characters 47
Boolean expressions 48
Mixed expressions 48

Sleep is very important for students

Although on this moment seems difficult to study foreign language while sleeping, we still remember that sleep plays a role in the success of this business. A good night's sleep is indeed essential to a person's well-being because it allows the body to recharge and regenerate.

Lack of prolonged sleep has harmful consequences for a person. In addition to being drowsy, lack of sleep has an effect. Perception of our environment; Reaction time; Mood; Concentration ability Weight; Memory; Concentrations. Among these various consequences, memory and concentration problems will undoubtedly be the most detrimental to people learning foreign languages. They are likely to delay their progress, not to mention that latent irritability can affect the student's enthusiasm and motivation.

Chapter 3 Performing Math Operations 50
Binary Arithmetic 50
Expression analysis 51
Determining the order of operations 52
Performing unary operations 53
Using assignment operators 54

Chapter 4 Performing Boolean Operations 55
Why we need logical operators 55
Using simple logical operators 55
Storing Boolean Values ​​57
Using Integer Variables as Boolean 58
Boolean operations and real variables 58
Reduced Calculations in C++59
Binary numbers in C++60
Decimal 60
Other number systems 60
Binary number system 60
Performing Bitwise Boolean Operations 62
Bitwise operations with one bit 62
Using bitwise operators 63
Simple example 64
Practical application of logical calculations 65

Learn a foreign language with hypnosis

In short, heal your sleep! Most of the time, they are hypnotherapists who offer one-on-one or distance learning programs via video or audio recordings. During these classes, students will Immersed in a state of relaxation that will promote their concentration and receptivity when the teacher will repeat the words and phrases to remember. Awakens to restore the dictated elements facing the teacher. After immersing yourself in the state of hypnosis, repeat again the elements learned with the teacher. The results of this method seem to differ from one person to another.

Chapter 5 Program control statements 66
Controlling Program Flow with Branch Instructions 66
Running Cycles 68
while loop 68
Using the increment and decrement operators 70
Using the for 71 loop
Avoid Infinite Loops 73
Special Loop Control Statements 73
Nested control commands 76
Selection instruction 77

It seems that the brain is indeed able to assimilate sentences and vocabulary during hypnosis sessions, but in a limited way. Theoretically, according to experts in this discipline, it will take 40 hours of hypnosis to master the language. Note, however, that even if the student succeeds in memorizing sentences and understanding them, theoretical aspect will always be absent. Indeed, language lessons under hypnosis focus only on the spoken language. All the rules of grammar, syntax and spelling are thrown into the background, and the student will have to take an active interest in himself if he wants to improve his command over the language.

Part 2: Becoming Functional Programmers 79

Chapter 6 Creating Functions 81
Writing and Using Functions 81
Defining the function sumSequence() 83
Calling the function sumSequence() 83
Divide and Conquer 83
Detailed function analysis 84
Simple Functions 85
Functions with Arguments 85
Single Argument Functions 85
Functions with Multiple Arguments 87
main() function 87
Function overloading 88
Defining Function Prototypes 89
Storing Variables in Memory 90
Using Header Files 91

It is important to remember that it is still impossible to learn a foreign language during sleep, even if the brain seems to be able to store information during the light and REM sleep phases. Lateral hypnosis, this is less easy to solve. Students appear to be able to retain vocabulary and sentences during sessions, but in a limited way. They find themselves quickly deprived when they have to face difficulties in speaking.

It is even better to rely on tried and tested methods such as language methods such as assimilation or language institute courses. To progress quickly and efficiently, there is no secret or miracle method: only regularity and regularity pays in the long run.

Chapter 7 Storing sequences in arrays 92
Benefits of arrays 92
Working with arrays 93
Array initialization 96
Array out of bounds 97
Whether to use arrays 97
Defining and using arrays with array elements 98
Using character arrays 98
Creating a character string 99
Row Management 100
Type string 103

Portuguese, English, Spanish, German, Russian, Italian, Korean, Turkish and many more: there is not enough choice. No need to reinvent the wheel with every web project: the basics are already there - all you have to do is focus on the business code, focus on the essence of your project, and nothing else. You can customize this admin area or create your own templates and your own forms.

Ideal for a collaborative project

Compatible with the technologies we love

The official documentation is very educational. We start with proper consideration: a hacker is seen as someone who commits cybercrime, but it is not, a hacker is much more than that. The concept of hacking should be understood as a discipline for learning new things and solving even difficult problems. So, how to become a hacker from scratch, from nothing? Today we will explain exactly how to pursue this profession and how to become a professional hacker. Of course, after reading this article, you cannot claim to be a hacker, but you can enter the world of hacking and, starting from the basics, aim to become a hacker.

Chapter 8 Getting Started with Pointers in C++ 105
Variable size 105
What is address 106
Address operators 106
Using Pointers 108
Comparison of pointers and postal addresses 109
Using Different Types of Pointers 109
Passing Pointers to Functions 111
Passing arguments by value 112
Passing Pointer Values ​​112
Passing arguments by reference 113
Heap usage 113
Scope 113
Scoping Issues 114
Using memory block 115

Chapter 9 Second introduction to pointers 117
Pointer Operations 117
Revisiting Arrays in the Light of Pointers 118
Using Pointer Operations to Address Within an Array 119
Using pointers to work with strings 120
Why do they use pointers when working with strings 122
Operations with pointers of other types 122
Differences between pointers and arrays 122
Declaring and Using Arrays of Pointers 124
Using arrays of strings 124
Access to main arguments. () 126
Arguments in DOS 127
Arguments in Dev-C++ 127
Arguments in Windows 127

Chapter 10 Debugging C++ Programs 128
Determining the type of error 128
Using Debug Printing 128
Identification of the "bug" No. 1 130
Identification of the “bug” No. 2 131
Using the debugger 134
What is a debugger 134
Working with the debugger 134
Running the test program 135
Program step by step 136

Part 3. Introduction to classes 143

Chapter 11 Introduction to programming 145
Microwave ovens and levels of abstraction 145
Cooking with functions 146
Cooking "object-oriented" dishes 146
Classification of microwave ovens 146
Why classification is needed 147

Chapter 12 Classes in C++ 149
Introduction to Classes 149
Class 149 Format
Addressing Class Members 150

Chapter 13 Working with classes 154
Activating objects 154
Simulation of real objects 155
Why We Need Member Functions 155
Adding a member function 156
Create a member function 156
Naming Class Members 157
Calling Member Functions 157
Calling Member Functions 158
Accessing Members from a Member Function 159
Scope resolution 161
Member function definition 162
Defining member functions outside a class 164
Member Function Overloading 165

Chapter 14 Pointers to objects 167
Defining Arrays and Pointers 167
Declaring arrays of objects 168
Declaring Pointers to Objects 169
Dereferencing Object Pointers 169
Using Arrows 170
Passing Objects to Functions 171
Calling a Function Passing an Object by Value 171
Calling a function passing a pointer 172
Passing an object by reference 173
Why Use Pointers and Links 174
Return to heap 175
Comparing Pointers and References 175
Why are links not used instead of pointers 175
Using linked lists 176
Other Linked List Operations 177
LinkedListData Program 178
Lists in the standard library 180

Chapter 15 Protected class members: do not disturb! 181
Protected members 181
Why you need protected members 181
How protected members work 182
Why Protected Members Are Good 183
Class 183 internal device protection
Classes with limited interface 184
Addressing Protected Members 184

Chapter 16 Creating and Deleting Objects 188
Creating objects 188
Using constructors 189
Why constructors are needed 189
Working with constructors 190
What is a destructor 194
Why you need a destructor 194
Working with destructors 194

Chapter 17 Construction Argument 198
How to Provide Constructor Arguments 198
Why Constructors Need Arguments 198
How to use constructor with arguments 199
Constructor overload 200
Defining Default Constructors 203
Constructing class members 204
Const Member Constructors 208
Construction Sequence Management 208
Local objects are created sequentially 209
Static objects are created once 209
All global objects are created before main() is called 210
The order in which global objects are created is undefined 210
Members are created in the order they are declared 211
Destructors delete objects in the reverse order of their creation

Chapter 18 Copy constructor 213
Copy object 213
Why you need a copy constructor 213
Using the copy constructor 214
Automatic copy constructor 215
“Shallow” and “deep” copies 217
Temporary objects 221
How to Avoid Temporary Objects 222
Copy constructor argument 223

Chapter 19 Static Members 224
Defining static members 224
Why Static Members Are Needed 224
Using Static 22S Members
Accessing static data members 226
Using static member data 227
Declaring static member functions 228
What is this 230

Part 4. Inheritance 231

Chapter 20 Class Inheritance 233
Why inheritance is needed 234
How class 234 is inherited
Using Subclass 236
Subclass construction 237
Subclass destruction 238
Relation contains 238

Chapter 21 Introduction to Virtual Member Functions: Are They Real? 240
Why polymorphism is needed 243
How polymorphism works 245
When a function is not virtual 246
Virtual Features 247

Chapter 22 Class decomposition 249
Decay 249
Implementing Abstract Classes 253
The Concept of Abstract Classes 254
Creating a full-fledged class from an abstract 255
Passing Abstract Classes 257
Are Pure Virtual Functions Necessary 257
Splitting C++ 259 Source Code
Separation of the program - class Student 260
Namespace Definition 261
Implementation of class Student 261
Program-Class Separation GraduateStudertt 262
Application Implementation 263
Project file 264
Creating a project file in Dev-C++ 265

Part 5 Useful Features 269

Chapter 23 assignment operator 271
Comparison of Operators and Functions 271
Stream Operators 272
Shallow copying - deep problems 272
Redefining an assignment operator 273
Copy protection 276

Chapter 24 Using I/O Streams 277
How IO streams work 277
Introduction to fstream subclasses 278
Direct reading from stream 282
What is endl 284
Subclasses of strstream 285
Working with manipulators 287

Chapter 25 Error handling and exceptions 290
Why a new error handling mechanism is needed 291
Exception mechanism 293
So what are we going to throw? 295

Chapter 26 Multiple Inheritance 298
Multiple Inheritance Mechanism 298
Disambiguating Multiple Inheritance 300
Virtual Inheritance 301
Object construction 306
The Negative Sides of Multiple Inheritance 306

Chapter 27 C++ Templates 308
Generating a function into a 309 template
Class Templates 311
Why class templates are needed 314
Tips for Using Templates 316

Chapter 28 Standard Template Library 317
Container string 317
List container 320
Iterators 321
Using the container tar 324

Part 6. Magnificent ten 329

Chapter 29 Ten Ways to Avoid Mistakes 331
Enable all warnings and error messages 331
Achieve clean compilation 332
Use a Sequential Programming Style 332
Limit visibility 332