The first thing that should call your attention is that in the declaration of duplicate the type of each parameter was followed by an ampersand sign (&).
The first thing that should call your attention is that in the declaration of duplicate the type of each parameter was followed by an ampersand sign (&).
Functions (II)
Arguments passed by value and by reference.
Until now, in all the functions we have seen, the arguments passed to the functions have been passed by value.
The scope of variables declared within a function or any other inner block is only their own function or their own block and cannot be used outside of them.
Functions (I)
Using functions we can structure our programs in a more modular way, accessing all the potential that structured programming can offer to us in C++.
A function is a group of statemen
The continue statement
The continue statement causes the program to skip the rest of the loop in the current iteration as if the end of the statement block had been reached, causing it to jump to t
The break statement
Using break we can leave a loop even if the condition for its end is not fulfilled. It can be used to end an infinite loop, or to force it to end before its natural end.