Passing objects to functions safely and efficiently I would like to have this code reviewed. I am learning C++ from a C background. How would I improve this code to make it more C++ like? This is a simple program that I wrote, which is a stripped down version of the actual full program I'm writing. 

#include &lt;iostream&gt;
using namespace std;

class Doge{
public:
    Doge();
    Doge(Doge&amp;);
    ~Doge();
    int GetAge() const { return itsAge; }
    void SetAge(int age) { itsAge = age; }

private:
    int itsAge;
};

Doge::Doge(){
    cout &lt;&lt; "Doge Constructor" &lt;&lt; endl;
    itsAge = 5;
}

Doge::Doge(Doge&amp;){
    cout &lt;&lt; "Doge Copy Constructor" &lt;&lt; endl;
}

Doge::~Doge(){
    cout &lt;&lt; "Doge Destructor" &lt;&lt; endl;
}

Doge * Function( Doge * theDoge){
    cout &lt;&lt; "In Function" &lt;&lt; endl;
    cout &lt;&lt; "Scott is now " &lt;&lt; theDoge-&gt;GetAge() &lt;&lt; endl;
}

int main(){

    cout &lt;&lt; "Make Doge" &lt;&lt; endl;
    Doge Scott;
    cout &lt;&lt; "Scott is " &lt;&lt; Scott.GetAge() &lt;&lt; endl;
    Scott.SetAge(10);
    Function(&amp;Scott);
    cout &lt;&lt; endl;
    return 0;
}
It doesn't feel natural to initialize a Doge with a fixed age:


Doge::Doge(){
    cout &lt;&lt; "Doge Constructor" &lt;&lt; endl;
    itsAge = 5;
}



It would be more natural to make age a mandatory constructor parameter:

Doge::Doge(int itsAge): itsAge(itsAge) {
    std::cout &lt;&lt; "Doge Constructor" &lt;&lt; std::endl;
}




The copy constructor doesn't actually copy anything.
Either remove it, or implement copying, for example:

Doge::Doge(Doge&amp; other){
    std::cout &lt;&lt; "Doge Copy Constructor" &lt;&lt; std::endl;
    this-&gt;itsAge = other.itsAge;
}




This function is declared to return a Doge *, but it returns nothing:


Doge * Function( Doge * theDoge){
    cout &lt;&lt; "In Function" &lt;&lt; endl;
    cout &lt;&lt; "Scott is now " &lt;&lt; theDoge-&gt;GetAge() &lt;&lt; endl;
}



This raises a compiler warning, at least with g++.



You probably implemented the destructor just to see when it gets called.
That's fine, for testing.
When you're done, just remember to remove it if it's not needed.