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

Learn to Use Parameters in Functions in C++

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 this usage in the most common syntax to define a function as below, return_type function_name ( type1 parameter1, type2…
Read more
C++Introduction to C++Learn C++

Learn to Use Pointers and Memory Address of a Variable in C++

1. Memory Address of a Variable TheRAM(Random Access Memory) is the memory of a computer that can be read and changed in any order, typically used to store working data and machine codes. In some operations, we useROM(Read Only Memory), In our applications, we have a lot of variables and every variable stored in the RAM and it takes space in the memory, These variables…
Read more
C++Introduction to C++Learn C++

Learn To Use Arithmetics On Pointers In C++

In a previous post, we learned that pointers are variables to point address which is also an integer value. That means we can do arithmetic operations on a pointer variable. But do not forget that we operate on the addresses in our RAMs, so we should be careful and we should know the range well. Simply, we can use ++, –, +, and – arithmetic operators on pointers: In a 32bit application…
Read more