Yeah, DP's right.
When you call the function you're not even asking for a return value:
if (string_pool == "quarter")
{
coin = quarter;
insert_coin(coin, money_pool);
}
If you was doing this:
if (string_pool == "quarter")
{
coin = quarter;
double return = insert_coin(coin, money_pool);
printf("%d\n", return); //or cout, whatever
}
Then I might understand, but even then, you would still be able to do:
if (string_pool == "quarter")
{
coin = quarter;
insert_coin(coin, money_pool);
printf("%d\n", money_pool); //or cout, whatever
}
I believe that is the point DP was trying to make to you.