C++ Beginner issue with classes, possibly destructor
<p>Below is the code for my current homework assignment. The program uses a couple overloaded operators to prompt the user for the name and calorie count of each of their three meals, then displays the results. Everything works fine through the first pass, however on the second pass it acts a little weird. Whatever the first meal is that the user is prompted with will keep it's name from the previous round. All other values for that meal and the next three can be entered in, however the name of the first meal stays the same no matter what. Just hoping someone can help point me in the right direction. Thanks!</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;iomanip&gt; 
#include &lt;string&gt;

using namespace std;

/*********************************************************************
File Name: meal.cpp
Author: Neal Rodruck
Date: 7/8/12
Purpose: To provide intergallactic travelers a means of measuring their
         daily caloric intake.
*********************************************************************/

class Meal
{
private:
    string name;
    int calorie;
public:
    //Class constructors
    Meal() : name("Meal 1"), calorie(0)
    {}
    Meal(string name, int calorie) : name(name), calorie(calorie)
    {
        while (calorie &lt; 1)
        {
            cout &lt;&lt; "Please enter a caloric value greater than 0!: ";
            cin &gt;&gt; calorie;
        }
    }

    //Class destructor
    Meal::~Meal()
    {}

    //get functions
    string getName() { return name; }
    int getCalorie() { return calorie; }

    //set functions
    void setName(string n) { name = n; }
    void setCalorie(int c) { calorie = c; }

    //Overloaded operators
    friend ostream &amp;operator&lt;&lt;(ostream &amp;out, Meal m);
    friend istream &amp;operator&gt;&gt;(istream &amp;in, Meal &amp;m);
    friend Meal operator+(Meal a, Meal b);
};

//Calculate two or more meal objects to obtain daily total
Meal operator+(Meal a, Meal b)
{
    return Meal("Daily Total", a.calorie + b.calorie);
}

//Prompt user for name and calorie information 
//for Meal object as well as test for greater 
//than zero calorie total
istream &amp;operator&gt;&gt;(istream &amp;in, Meal &amp;m)
{
    char name[21];
    int calorie = 0;

    cout &lt;&lt; "Enter name: ";
    cin.getline(name, 21);  
    cout &lt;&lt; "Enter calories: ";
    in &gt;&gt; calorie;

    while (calorie &lt; 1)
    {
        cout &lt;&lt; "Please enter a caloric value greater than 0!: ";
        cin &gt;&gt; calorie;
    }

    m.setName(name);
    m.setCalorie(calorie);
    cin.ignore();

    return in;
}

//Display object information
ostream &amp;operator&lt;&lt;(ostream&amp; out, Meal m)
{
    out &lt;&lt; "Name: " &lt;&lt; m.name &lt;&lt; " Calories: " &lt;&lt; m.calorie;
    return out;
}

//function prototypes
void makeNull(Meal&amp; breakfast, Meal&amp; lunch, Meal&amp; dinner);
void introduction();
void display(Meal b, Meal l, Meal d, Meal t);
void end();
void enterMealInfo(Meal&amp; breakfast, Meal&amp; lunch, Meal&amp; dinner);

int main()
{
    //Display introductory message
    introduction();

    //Meal Objects
    Meal breakfast;
    Meal lunch;
    Meal dinner;

    //Capture user response
    char response = ' ';

    //Use loop to allow user to enter information for 
    //more than one day
    while (response != 'n')
    {


        //Prompt user for meal information
        enterMealInfo(breakfast, lunch, dinner);

        //Use information captured to create Daily Total meal object
        Meal total(breakfast + lunch + dinner);

        //Display results
        display(breakfast, lunch, dinner, total);

        //Prompt user for more input
        cout &lt;&lt; "Would you like to check again? Please selct \"y\" or \"n\": ";
        cin &gt;&gt; response;
        response = tolower(response);
    }

    //Display exit message
    end();

    return 0;
}

//Display introductory message
void introduction()
{
    cout &lt;&lt; "Welcome to The Voyager Trek!";
    cout &lt;&lt; "\nPlease use this app to keep track of your daily caloric intake!\r\n";
}

//Display meal and summary information
void display(Meal b, Meal l, Meal d, Meal t)
{
    cout &lt;&lt; "\n" &lt;&lt; left &lt;&lt; setw(20) &lt;&lt; "Meal" &lt;&lt; right &lt;&lt; setw(20) &lt;&lt; "Calories";
    cout &lt;&lt; "\n" &lt;&lt; left &lt;&lt; setw(20) &lt;&lt; b.getName();
    cout &lt;&lt; right &lt;&lt; setw(20) &lt;&lt; b.getCalorie();
    cout &lt;&lt; "\n" &lt;&lt; left &lt;&lt; setw(20) &lt;&lt; l.getName();
    cout &lt;&lt; right &lt;&lt; setw(20) &lt;&lt; l.getCalorie();
    cout &lt;&lt; "\n" &lt;&lt; left &lt;&lt; setw(20) &lt;&lt; d.getName();
    cout &lt;&lt; right &lt;&lt; setw(20) &lt;&lt; d.getCalorie();
    cout &lt;&lt; "\n" &lt;&lt; "----------------------------------------";
    cout &lt;&lt; "\n" &lt;&lt; left &lt;&lt; setw(20) &lt;&lt; t.getName();
    cout &lt;&lt; right &lt;&lt; setw(20) &lt;&lt; t.getCalorie() &lt;&lt; "\n";
}

//Display exit message
void end()
{
    cout &lt;&lt; "\r\nThank you for using our app, goodbye!\r\n";
    system("pause");
}

//Using meal objects passed by reference this function 
//will populate appropriate objects with name and calorie
//information
void enterMealInfo(Meal&amp; breakfast, Meal&amp; lunch, Meal&amp; dinner)
{
    cout &lt;&lt; "\r\nWhat did you have for breakfast?\r\n";
    cin &gt;&gt; breakfast;
    cout &lt;&lt; "What did you have for lunch?\r\n";
    cin &gt;&gt; lunch;
    cout &lt;&lt; "What did you have for dinner?\r\n";
    cin &gt;&gt; dinner;
}
</code></pre>
