Skip to main content

Posts

Showing posts from October, 2017

Single Link list implementation in C++

LINK LIST PROGRAM Creating Node   #include using namespace std; class node{ private :   int data,size; node *next,*current,*head,*temp;   public:    node()    {     head=NULL;     temp=NULL;     current=NULL; next=NULL; size=0; } void insert()    {     int d;     cout<<"enter the value for the node :" cin>> d; temp=new node; temp->data=d; temp->next=NULL; size++;     if(head==NULL)     { head=temp; current=temp; } else { current->next=temp; current=current->next; }   }     void display()    { temp=head; while(temp!=NULL) {      cout< data< next; } } }; int main() { node n; n.insert();n.in...

Password in c++ (password program in c++)

/* password program in c++ #include<iostream> #include<conio.h> using namespace std; int main() {  char pss=' ';  string pass="";  cout<<"enter your password :"<<endl;  while(pss!=13)  {   pss=getch();   if(pss!=13)   {    pass+=pss;    cout<<"*";   }  } if(pass=="1234") {  cout<<" passowrd is ok "; } else {  cout<<"not accepted "; } } click to watch video