C++ Basic Elements

Any programming language is a set of rules applied to symbols and special words which are used to construct a program. There are some elements that are similar in most of the programming languages including C++. Therefore before moving to the next sections, we define those basic elements. These basic elements include a set of … Read more

Categories C++

C++ History and advantages

C++ History C++ is a general purpose *high level programming language. It is the third most popular programming language behind Java and C. C++ provides object oriented and imperative features along with the low level memory manipulation features as well. It was developed as an enhancement to C language by Bjarne Stroustrup in 1979 at … Read more

Categories C++

C++ Templates

C++ templates are one of the most powerful features of C++ Programming language. Templates allow programmers to create generic programs. This means that programmer can create a single function or a class to work as a template and then use it in multiple codes with different data sets. C++ Templates are like algorithms or containers … Read more

Categories C++

C++ Multithreading

C++ Multithreading is the process of multi tasking in C++ programming language. In real life, if a person performs two or more tasks at the same time, then this is called multi tasking. For example, if a person is driving car and at the same time attending calls then this multi tasking. This process is … Read more

Categories C++

C++ Dynamic Memory

C++ Dynamic memory is run time memory that generates on runtime. There may come situation when program takes user input and the nature of user input is unknown. In this situation, memory is allocated dynamically. It is run time or dynamic memory allocation. Usually, compiler allocates the memory is on compile time. In most cases … Read more

Categories C++

C++ Exception Handling

C++ Exception Handling refers to three keywords: try, catch and throw. While programming in C++, there often comes scenarios when compiler shows error. Errors occur when there is some problem in the code and it cannot be compiled. There can be of different types such as: Syntax error Wrong input error Error made by programmer … Read more

Categories C++

C++ Friendship and Inheritance

C++ Friendship is the feature of declaring classes or functions with friend keyword. The classes or functions declared with friend keyword have a relationship of friendship with the class. C++ Inheritance Inheritance and abstraction are major features of object oriented programming OOP. In OOP there are following access specifiers that help achieve inheritance. Public Protected … Read more

Categories C++

C++ File Handling

C++ programming language provides the capability to handle files through the code. Other than printing the results on the console programmer can also save results or read data from files. This is called C++ file handling. For this purpose, C++ programming language has fstream library. It is used along with iostream library. The syntax is: … Read more

C++ Linked Lists

C++ linked list is a type of linear data structures that save dynamic data. Linked lists consists of nodes. Each node in a linked list connects to the nodes next to it. The implementation of linked list is based on pointers. The below diagram shows a linked list containing 4 nodes. Nodes are the base … Read more

C++ Interfaces

C++ Interfaces are also a part of object oriented programming OOP. Interface represents the behavior of a class. That means interface can show the list of functions that a class performs. Abstract classes help us achieve the functionality of interfaces. Abstract classes are not related to Data Abstraction. Abstract classes help achieve C++ interfaces while … Read more

Categories C++