int Scores::Display()
{
//temp node to traverse
node * current = head;
if(head != NULL)
{
while(current -> next != NULL)
{
cout << "Last name : " << current -> lastname << ".\n"
<< "First name : " << current -> firstname << ".\n";
current = current -> next;
}
cout << "Last name : " << current -> lastname << ".\n"
<< "First name : " << current -> firstname << ".\n";
}
else
{
cout << "The list is empty!";
}
}
Please enter the student's first and last name.
First name : Bob
Last name : Marley
How many program assignments did this student finish?
3
Would you like to add another student?
n
▒ԂLast name : n
First name : ▒ӂ
Assignments completed : 3/5.
I'm not sure why it outputs it differently from my Display function. If I cout from my Insert function it shows the information inside the node just fine, but when I call Display in main it shows those symbols and stuff. Any ideas?