struct node { string bousha; node *next; }; void main() { string name; node *head=NULL; cout<<"Enter the name :"<<endl; cin>>name; node *temp; temp = (node*)malloc(sizeof(string)); temp->bousha=name; temp->next=head; head=temp; cout<<"name is :"<<temp->bousha<<endl; getch(); }
string
(node*)malloc(sizeof(string));
new
node
sizeof
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)