C++Introduction to C++Learn C++

Learn About Parameters Passed by Reference in Functions

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 variables represented by the function parameters. Let’s remember an example, #include <iostream> int add (int…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

Discover Function Overloading in C++

Do you want to learn how to overload a function ? What is Function Overloading ? What does overloaded function means ? How we can use Function Overloading in C++ ? How we can use multiple parameter types in our functions ? Here we go,Function Overloading is used to operate with the same function by defining it with different variable types. By using Function Overloading, a function can be used…
Read more
C++Introduction to C++Learn C++

Discover Goto and Labels in C++

Thegotostatement is used to jump to alabelthat provides an unconditional jump from the goto to a labeled statement in the same function. We can also do the same loops as the same in for() while() loops by using goto statement. Instead of goto we mostly use for(), while(), do-while() statements or functions, classes, because they are faster and better than using goto. Rarely…
Read more