Hello all,
I have the following code which prints out all the videos I have stored in a linked list :
void viewList(list<vid> &li)
{
system("cls");
cout<< "\t\t\t\t *List of films*\n";
cout<< "\t\t\t*****************************\n"<<endl;
for(it=li.begin(); it!=li.end(); ++it)
{
vid t;
t = *it;
cout << "\t\t\t" << t.getTitle() << endl;
}
cout<< "\t\t\t*****************************\n"<<endl;
system("PAUSE");
system("cls");
}
What I want to know is if this code is BAD ? Do I have to delete the vid Object t which I use to enable me to print out the title each time.
If so do I do this in a destructor and how ??
Thank you
Blim