> 
> Create a C++ program which will act like contact search app in mobile.
>  For example, if the following contacts are saved in contact list:
> 
> 
> 
> > 
> > Massi  
> > 
> >  Pradip  
> > 
> >  Prasad  
> > 
> >  Praveed  
> > 
> >  Raju
> > 
> > 
> > 
> 
> 
> And if user type "a" then following names should be displayed:
> 
> 
> 
> > 
> > Massi  
> > 
> >  Pradip  
> > 
> >  Prasad  
> > 
> >  Praveed  
> > 
> >  Raju
> > 
> > 
> > 
> 
> 
> if user type "Pr" then following names should be displayed:
> 
> 
> 
> > 
> > Pradip  
> > 
> >  Prasad  
> > 
> >  Praveed
> > 
> > 
> > 
> 
> 
> Basically it should display all the names which contain the search
>  string anywhere in name.
> 
> 
> 

---

```
#include <iostream> 
#include <stdio.h> 
#include <conio.h>
#include <string>
#include <map>
#include<iomanip>

using namespace std; 

int main() { 
    map<string,int> contacts;
    contacts["Pradip"]=999092456;
    contacts["Raju"]=999092457;
    contacts["Praveed"]=999092445;
    contacts["Prasad"]=999092415;
    contacts["Asim"]=999092785;
    contacts["Massi"]=999092215;
    int key_code;
    string key;
    while (true)
    {

            if ( kbhit() ){

                key_code = getch();
                system("CLS");

                if (key_code == 8 ){
                    key.size() ? key.pop_back(): 0;
                }
                else{
                    key+=key_code;
                }
                cout<<"Contacts with : "<<key<<endl;

                for (map<string,int>::iterator &tter = contacts.begin();tter != contacts.end();tter++)
                {
                    if (string::npos == tter->first.find(key) && !key.empty()){
                        continue;
                    }
                    std::cout<<setw(4)<<"Name : "<<setw(10)<< std::left <<tter->first.c_str()<<setw(14)<<", Number : "<<setw(10)<<tter->second<<std::endl;
                }

            }
            else 
                continue;
    }
    return 0; 
}

```