Hi so this is my first post, Im trying to type a function that will display a linked list. I dont have any errors but when I compile it and try to display the linked list my program crashes.
void displayList ( AccountNode* list ) {
AccountNode* current = list;
do {
cout<<"display"<<endl;
Account* tx = current->account;
displayAccount (*tx );
cout<<"display1"<<endl;
current = current->next;
} while ( current != NULL );
}
Thats my displayList and all other functions in it. Right after displayAccount(*tx) the program crashes so Im assuming something is wrong with the displayAccount function but I cant see what.
PLEASE HELP!!!