Skip to main content

Posts

Showing posts from October, 2017

Single linklist program in c++(only inserting and display function)

#include<iostream> using namespace std; struct node{ int data; node *next; }; class sll{ private:          node *head,*tail; public:         sll(){         head=0;         tail=0;         }         insert(int mydata){         node *tmp=new node;         tmp->data=mydata;         tmp->next=0;          int select;         cout<<"Select one of this option\n";         cout<<"1.insert element at first position\n";         cout<<"2.insert element at Any position\n";   ...