I am having problems with making my link list work. Everytime I create a node and try to link it, I am only able to print out the last node entered. Below is the prototype for my nodes and the code to link them. COuld you please tell me what my fault is.
typedef struct movie *mov_ptr;
//Defining the structure for the movie
typedef struct actor *act;
Here each actor has a link to the various movies acted by the actor.I initially declared head_actor as null in the main.
//Code to add a node
void add_node_actor (string Texts, int count)
for (int h=2; h<count; h++)
//code to return the link list's contents
while(head_actor != NULL)
cout<<"Actor's name is.."<<head_actor->actor_name<<endl;
while(head != NULL)