
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C++ Programming Internals
C++ Internals means how the working of C++ compiler compiling the .cpp code and giving us the output. C++ is a popular programming language mostly used for writing system software. It is an extension of the C programming language. C is a compiled language. The C++ compiler compiles C++ code to an object or executable file is generated. The executable or the binary files contains machine executable instructions and some metadata of the machine instructions.
A typical way of compiling a C++ program is to run the compiler on C++ code. The compiler will generate machine instructions which are set of instructions that a CPU supports. It means that Object Oriented concept is implemented using the machine instructions. Different C++ compilers may use different strategies and may be written in different languages. But the differences are not much and there is a common pattern that every compiler follow.
Person who wants to understand the compiling of code in compiler should understand the C++ internals. Understanding these compiler working often helps you to write good code.
Developer and programmer should know these things who write mix-mode code (C, C++, assembly) then this will be very helpful.
Some of the processes given below are key components of C++ internals like
- Function Overloading − giving multiple definitions to the same name
- Class − An entity that holds together data and related functions.
- Structure − An entity that hold data of different data types
- Constructor − default function of a class that is called when objects are created.
- Destructor − default function of a class that is called when objects are destroyed.
- Inheritance − Concept of using members of one class by another class.
- Multiple Inheritance (Multiple Base Classes) − single class inherits more than one base class.
- Multilevel Inheritance − A inherits B that inherits C.
- Multiple Base Classes − also called multiple inheritance.
- Virtual functions − function that is defined in the child class.
- Virtual Bases Class − Prevent multiple instances of same base class.