#include <iostream>
void function1( int number)
{
number = 10;
}
void function2( int& number)
{
number = 10;
}
int main()
{
int var = 3;
function1( var ); // this wont change var since it is passed by value (param type is int)
std::cout << var << std::endl; // 3 is printed
function2( var ); // this will change var since it is passed by reference (param type is reference to int)
std::cout << var << std::endl; // 10 is printed
};