Your else
clause is missing braces. That only works when the body of the clause has one statement, yet here you have (presumably) three.
ddanbe commented: Nice work done here! +15
Slavi commented: kudos +6
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
gusano79 commented: aaaand how did I miss that? +10
stultuske commented: ^_^ +0
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
00Gambit commented: thanks +0
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
shahera.arafat commented: void print(node*head,int id){ node*p; p=head; while(p!=NULL){ if(p->id==id){ cout<<p->id; return; } p=p->next; } cout<<"node doesn't exist"; } this (return;)here,for what did they put it ?:/ +0
J.C. SolvoTerra commented: Thank you. +3