I am not sure but I think display should writer as below:
Code:
case 3: 
          temp=top;  
    if(temp->link!=NULL)      
 {        cout << "\nStack is empty\n";  }   
       while(temp!=NULL)  
 {               
    cout <<temp->data<<"->"; 
                temp=temp->link;           
 }   
          break;

Last edited by skp819; 2Jan2009 at 13:55..