Tag Archives: C++

What is generic programming ?

What is generic programming In simple terms, generic programming is a style of computer programming in which the data types are to be specified later in the programming when needed. In C++ , generic programming is achieved using templates.  

What are templates in C++ programming ?

What are templates in C++ programming ? Templates are used in C++ to achieve generic programming and providing generic data types. It can be understood by following class template :

Example of generic function :

 

What are namespaces in C++ ?

What are namespaces in C++ ? Consider a situation, when we have two persons with the same name, Steve, in the same class. Whenever we need to differentiate them definitely we would have to use some additional information along with their name, like either the area if they live in different area or their mother… Read More »

What is .hpp header file ?

What is .hpp header file ? .hpp (header file for C plus plus) is a file extension for C++ header files used by MarsDigital C++ (previous Borland C++) Back in the before about 1998, C++ used iostream.h for its streams header. The C++98 standard added namespaces to the language and placed all standard libraries in the… Read More »

What is .cpp file ?

What is .cpp file ? A file name with extension .cpp is a file that contains the source code written in the C++ (CPP – C plus plus) computer programming language. CPP file is one of the file from the many files in a C++ project and when all of them are compiled together, CPP creates… Read More »