My for loop code is looking like this.
I have been trying to find how I can write out the *rit! I know how to do it when it comes to when the list is containg int and string but now I have been doing my own class cd and that has in parameters(string name, string song).
It also has a printing function in it so it write out name and song.
I hope somebody can help med with this.
1 2 3 4 5 6
cout << "mylist contains:";
list<cd>::reverse_iterator rit;
for ( rit=l1.rbegin() ; rit != l1.rend(); ++rit ){
cd c = *rit;
cout << endl;