#include <iostream>
using namespace std;

void addTenWrong(float amount){
	amount=amount+10.0;
	cout<<"[Inside Wrong Function]: Copy complete: "<<amount<<endl;
}

void addTenRight(float cvar){
	cvar=cvar+10.0;
}

int main(){
	float myMoney=50.0;
	cout<<"Starting money: "<<myMoney<<endl;
	addTenWrong(myMoney);
	cout<<"After addTenWrong: "<<myMoney<<" (DID'NT CHANGE!)"<<endl;
	cout<<"--------------------------------------------"<<endl;
	addTenRight(&myMoney);
	cout<<"After addTenRight: "<<myMoney<<" (CHANGED SUCCESSFULLY!)"<<endl;
	return 0;
}
