C++ Variable Initialization

Whenever we need to store data in computer memory we have to use variables. Variables are actually the symbolic name of the location somewhere in the computer memory.  The variables can hold different values of same data type at different time during the execution of a program. There are many ways for C++ Variable initialization.  … Read more

Categories C++

C++ Operators

C++ Operators are special symbols that are used to operate different mathematical and logical operations. These operations are performed on variables and constants. These variables and constants are called Operands. Operators help to solve mathematical equations. There are different types of operators used in the C++ programming language. Following are their types: Assignment Operators Extended-Assignment … Read more

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++ 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++ 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++ 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++ 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++ 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++ Variables and Data Types

The main feature of the C++ is that you need to define everything before using it. C++ Variables are the names assigned to the memory locations where different type of data is stored. Data types define the type of the data to be stored in the memory locations. The variable are defined in this way … Read more