can someone help me with this code?
<p>I have done all the coding but I am getting this one error which is not allowing the program to run. The error is :</p>

<blockquote>
  <p>"The variable 'start' is being used without being initialized."</p>
</blockquote>

<p>and the same for the other variables. This is the code :</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
using namespace std;

struct Mytime
{
    int hours;
    int mins;
};

int timecmp(Mytime time,Mytime time1)
{
    if(time.hours == time1.hours)
    {
        if(time.mins == time1.mins)
        {
            return 0;
        }
        else
        {
            if(time.mins &gt; time1.mins)
            {
                return 1;
            }
            else
            {
                system("pause");
                return -1;
            }
        }
    }
else
{
    if(time.hours &gt; time1.hours)
    {
        return 1;
    }
    else
    {
        system("pause");
        return -1;
    }
}
}


int setTime(Mytime t, int h, int m)
{
    if(h&gt;23 || h&lt;0 || m&gt;59 || m&lt;0)
    {
        cerr &lt;&lt; "Invalid time range!!" &lt;&lt; endl;
        system("pause");
        return -1;
    }
    else
    {
        h=t.hours;
        m=t.mins;
        return 0;
    }
}

void displayTime(Mytime t)
{
    if(t.hours&lt;10 || t.mins&lt;10)
    {
        cout &lt;&lt; t.hours &lt;&lt; ":" &lt;&lt; t.mins &lt;&lt; endl;
    }
    else
    {
        cout &lt;&lt; "0" &lt;&lt; t.hours &lt;&lt; ":" &lt;&lt; "0" &lt;&lt; t.mins &lt;&lt; endl;
    }
}

void elapsed(Mytime t1,Mytime t2,Mytime&amp; duration)
{
    int hrDiff=0;
    int minDiff=0;
    hrDiff = t1.hours - t2.hours;
    minDiff = t1.mins - t2.mins;
    duration.hours = hrDiff;
    duration.mins=minDiff;
}

int main()
{
    Mytime start,finish,timeGap;
    int h=0,m=0;
    do
    {
        cout &lt;&lt; "Enter start hh mm : ";
        cin &gt;&gt; h &gt;&gt; m;
    }   while(setTime(start,h,m));
    do
    {
        cout &lt;&lt; "Enter finish hh mm : ";
        cin &gt;&gt; h &gt;&gt; m;
    }   while(setTime(finish,h,m));
    elapsed(start,finish,timeGap);
    cout &lt;&lt; "Time elapsed from ";
    displayTime(start);
    cout &lt;&lt; " until ";
    displayTime(finish);
    cout &lt;&lt; " is ";
    displayTime(timeGap);
    cout &lt;&lt; endl;
    system("pause");
    return 0;
}
</code></pre>
