Okay, so I'm still stumped on an output problem. The problem is, I have list items and one of those column objects has more than one item(the other columns don't for each particular item)
Some reason, when I add another object to the console for printing it ends up like:
Like this image: http://dl.dropboxusercontent.com/u/57922856/dvd.png
I need to make sure that when the previous line has two or more actors, the next line doesn't bunch up in front of the over hanging actors. I'm not sure how to do this, I've tried using endl, but no luck. Any assistance would be great. Here is the full source code: http://justpaste.it/l4ed
Here is my code I need help on:
{
//table format
cout << setw(10) << "\nMovie Title: "
<< setw(10) << "Length:"
<< setw(10) << "Year: "
<< setw(10) << "Actors/Actresses:"
<< setw(10) << "Characters:\n" << endl;
cout << "------------------------------------------------------------\n";
for (int i = 0; i < vectorName.size(); i++)
{
if(i <1)
{
if(mydvd[i].getLength()!=0)
{
cout <<endl<<setw(10)<< right << mydvd[i].getTitle()
<<setw(10) << mydvd[i].getLength()
<< setw(10) << mydvd[i].getYear();
}
else
{
cout <<setw(10)<< right << mydvd[i].getTitle();
}
}
else
{
if(mydvd[i].getLength()!=0)
{
cout <<endl<<setw(10)<< right << mydvd[i].getTitle()
<<setw(10) << mydvd[i].getLength()
<< setw(10) << mydvd[i].getYear();
}
else
{
cout <<setw(10)<< right << mydvd[i].getTitle();
}
}
if(i <1)
cout<<"\t\t"<<vectorName[i].getName()
<< " "<<vectorCharName[i] << endl;
else
{
cout<<"\t\t\t\t"<<vectorName[i].getName()
<< " "<<vectorCharName[i] << endl;
}
}
}