Explore BrainMass

Explore BrainMass

    understanding Classes in C++

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    I am having a dificult time understanding Classes in C++ and how to implement member functions. Given the attached code I need to:

    1: Add the code to implement all of the member functions.
    2: Test them from main as coded.
    3: Show the order the constructors are called.
    4: Show the order the destructors are called.

    © BrainMass Inc. brainmass.com December 24, 2021, 4:45 pm ad1c9bdddf


    Solution Preview

    once you have define your classes
    make another cpp file say StringImpl.cpp

    <br>don't forget to include the class with the class declaration

    <br>#include "TheFileWithTheClassDeclaration.cpp"

    <br>//lets say the class is called ...

    Solution Summary

    This job aids in understanding Classes in C++. The code to implement all of the member functions are added.