C++C++11C++14C++17Introduction to C++Learn C++

Learn to Use Function Templates in C++

A Template is a simple and a very powerful statement in C++. A Template Function may have multiple template parameter types, and the function can still use regular non-templated types. In a previous post, about Function Overloading, we had two add() functions working with integer and float numbers, in that example we can say add() function is overloaded with int and float parameter types, and…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

Learn About Function Declaration and Definition in C++

In C and C++ programming language there are two parts of a function, Declaration, and Definition. Function Declarationis the combination of the return type of function, function’s name, and parameters in parenthesis.Function Definitionis the body of the function includes statements and other functions. In general use, they are defined together as below, myfunction() // this…
Read more
C++Introduction to C++Learn C++

Learn About the Main Function in C++

The Main Functionis the main part of an application coded in C++, it is the designated entry point to a program that is executed in an operating system (on Windows, iOS, Mac-OS, Android, Linux etc.). Every C++ application program has a main function which starts all application statements, and functions. We can create C++ files without the main function and we can use them as a library…
Read more