C++ music album print out the track title
<p>i a bit stuck on this question..</p>

<p><em><strong></em></strong><em>header file</em><strong><em>*</em>*</strong></p>

<pre><code>#include "Duration.h"

class Track
{
private:

    Duration trackTime;
    std::string trackTitle;

public:

    inline Duration getTrackTime() const;

    inline std::string getTrackTitle() const;

    Track(Duration d  = Duration(0,0,0),std::string trackTitle = "");

};

inline std::string Track::getTrackTitle() const
{
    return trackTitle;
}
</code></pre>

<p><em><strong></em>**<em>*</em>*</strong><em>cpp file..<strong></em>**<em>*</em>*</strong></p>

<pre><code>using namespace std;

Track::Track(Duration trackTime , string trackTitle)
{
    this-&gt;trackTitle = trackTitle;
    this-&gt;trackTime  = trackTime;

}

istream&amp; operator&gt;&gt;(istream&amp; is, Track &amp; t)
{
    Duration trackTime;
    string trackTitle;

    char c1;

    if (is &gt;&gt; trackTime &gt;&gt; c1 &gt;&gt;trackTitle)
    {
        if(c1 == '-')
        {
            t = Track(trackTime,trackTitle);
        }
        else
        {
            is.clear(ios_base::failbit);
        }
    }

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

<p><em><strong></em>**<em>*</em>**</strong><em>main</em><strong><em>*</em>***</strong></p>

<pre><code>int main(int argc, const char * argv[])
{
    Track track;
    cin &gt;&gt; track;
    cout &lt;&lt; track &lt;&lt;endl;


}
</code></pre>

<p>i just testing the ostream is what i expect. </p>

<p>but when i input the string like this. "0:03:30 - Hey Joe (Billy Roberts)"</p>

<p>it only print out "0:03:30 - Hey"  </p>

<p>can anyone explain why the print out result like that.?
and how can i print out the whole track title.? </p>
