Object-Oriented Programmingis a way to integrate with objects which can containdatain the form (attributesorpropertiesof objects), andcode blocksin the form of procedures (methods,functionsof objects). These attributes and methods arevariablesandfunctionsthat belong to the class, they are generally referred to…
Learn about Data Structures in C & C++
April 30, 2021
In general, when we do programming we have a lot of variables and some of these variables are properties of an object, for example if we want to make a database about students in C++, each student has similar properties to store. We can generalize all these properties in a…
Learn about Object Oriented Programming, Introduction to OOP
April 29, 2021
When learning about C++ programming a lot of programmers have many questions. Let’s answer them in this topic. One of the biggest difference between C and C++ programming languages is, C++ is anObject Oriented Programming (OOP)language that supports using…
Learn to Use Function Templates in C++
April 27, 2021
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…
Learn About Parameters Passed by Reference in Functions
April 24, 2021
In the functions that we created in previous posts, their parameters have always been passedby value. This means that, when we call a function, what is passed to the function are the values of these parameters on that moment of the call. Variables are copied into the…
Learn to Use Parameters in Functions in C++
April 23, 2021
In the C++ programming language, we can add functions with many parameters, each parameter may have different types. We can add as many parameters as we want by defining its type and its name to be used inside that function separated with ‘,’ coma. We can shape…
Learn About Function Declaration and Definition in C++
April 22, 2021
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…
Learn About Void and Return Type in Functions in C++
April 21, 2021
We explained how to declare and define simple functions. They had no return, and in a previous post we explained that main function has an integer return that represents our code is successfully done or not. In C++ programming language, we can easily define many functions…
Learn About C++ Functions
April 20, 2021
Functions, also known asProceduresorSub-Programs,Sub-Algorithms,allow to structure programs in segments of code to perform tasks. A Function is a group of statements that has function a name and can be called with parameters to operate…
Learn About the Main Function in C++
April 19, 2021
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…