unode *node = list.head;
for(int i = 0; i < list.size ;i++)
{
cout << node->data.f_name << endl;
cout << node->data.l_name << endl;
cout << node->data.address << endl;
cout << node->data.gender << endl;
cout << node->data.id << endl;
cout << node->data.age << endl;
cout << node->data.phone << endl;
node = node->next; }
Your loop only accesses the single node at
list.head
. So first you should use the debugger to check the contents of that node.
The fix for the loop is as annotated above>