Function returns undesired value
<p>This is my first time posting to this site, therefore I would appreciate all criticisms in a constructive manner. I am learning to write Object Oriented programming with C++ and decided to make a trivial simulation of an ATM machine that takes in user input and processes it (i.e makeDeposit, checkBalance, etc.).</p>

<p>My Problem: BankAccount method: makeDeposit end up changing the output of getBalance() to prefix with a zero:
for example: makeDeposit(10) will change getBalance() from 0 -> 010.</p>

<pre><code>`//BankAccout.h
#ifndef BANK_ACCOUNT_H
#define BANK_ACCOUNT_H
#include &lt;string&gt;
class BankAccount {

private:
    float m_accountBalance;
public:
    BankAccount ();
    float getBalance();

    /*Can I pass by value or would reference be necessary?*/
    void makeDeposit(BankAccount&amp;, int);

};

#endif`



   //BankAccout.cpp
#include "BankAccount.h"

#include &lt;iostream&gt; //remove once done
using namespace std; //remove once done

BankAccount::BankAccount () {
    m_accountBalance = 0;
}

float BankAccount::getBalance() {
    return m_accountBalance;
}

//increment the object balance based on ammount
void BankAccount::makeDeposit(BankAccount &amp;bao, int deposit_amount) {
    bao.m_accountBalance += deposit_amount;
}



int main () {
    BankAccount b1;
    cout &lt;&lt; b1.getBalance(); //returns 0
    b1.makeDeposit (b1,1); //returns 01
    cout &lt;&lt; b1.getBalance();
    //Ex.
    //makeDepost(b2, 10);
    //b2.getBalance(); will retrun 010

    return 0;
}
</code></pre>

<p>Any tips would also be much appreciated as I am about to take the roughest Data Structures course with little experience with object oriented programming.  </p>

<p>Also, could someone explain to me what subversion is and how it is used. </p>
