C++ programs are compiled because of their high performance. But its development environment, in order to facilitate testing, makes the debugging environment interpretation. That is, in the development process, to interpret the execution of the statement to carry out debugging, to compile from the development environment and start the way to generate the program’s final execution code.

Cross-platform game design for C++ applications

A generator is the process of converting source code (C++ statements) into a running application. If the program is written correctly, this process is usually done by pressing a function key. The process actually breaks down into two steps.

The first step is to compile the program, using a compiler. The compiler converts C++ statements into machine code (also known as object code); If this is successful, the next step is to link the program, using the linker. The linker merges the compiled machine code with code from the C++ library. The C++ library contains functions that perform some common tasks (” function “is another name for a subroutine).

C++ features:

1. Support data encapsulation and data hiding. In C++, classes are tools that support data encapsulation, and objects are implementations of data encapsulation. C++ supports data encapsulation and data hiding by creating user-defined classes.

Support inheritance and reuse. New types can be declared on top of existing C++ classes, which is the idea of inheritance and reuse. Inheritance and reuse allow you to organize programs more effectively, clarify relationships between classes, and leverage existing classes for more complex, in-depth development. A newly defined class is a subclass and becomes a derived class. It can inherit all non-private attributes and methods from its parent class as its own members.

3. Support polymorphism. Use polymorphism to specify presentation behavior for each class. Polymorphism forms a tree structure consisting of parent classes and their subclasses. Each subclass in the tree can receive one or more messages with the same name. When a message is received by an object of a class in the tree, the object dynamically determines the usage of the message given to the subclass object. This property of polymorphism allows for high-level abstractions.

Free C++ learning materials