 <conio.h>
#include <stdlib.h>
#include "User.h"
using namespace std;

int main()
{
string mypassword; //file password
string password; //input password
char ch;
    ifstream file;
    file.open("mypassword.txt");
    file >> mypassword;
    file.close();
cout << "=====================================================================\n";
cout << "                               WELCOME!"<<endl;
cout << "=====================================================================\n";
cout << " Enter the password to access the program : ";
   ch = _getch();
   while(ch!= 13){//character 13 is enter
      password.push_back(ch);
      cout << '#';
      ch = _getch();
}
cout << "\n=====================================================================\n";
if(password==mypassword)
{cout<<"\n Correct password!"<<endl;
 cout << "=====================================================================\n";
int choice;
bool menu = true;//menu
User people[100];
int num_people=0;
while (menu!= false){
cout << "|===================================================================|\n";
cout << "|                                =MENU=                             |\n";
cout << "|===================================================================|\n";
cout << "|                            0 - Phone book!                        |\n";
cout << "|                            1 - Add user!                          |\n";
cout << "|                            2 - Delete user!                       |\n";
cout << "|                            3 - Sort users!                        |\n";
cout << "|                            4 - Edit user!                         |\n";
cout << "|                            5 - Help!                              |\n";
cout << "|                            6 - Exit!                              |\n";
cout << "|===================================================================|\n";
cout << " Enter your choice and press enter: ";
cin >> choice;
 User user;
 fstream file;
file.open("phonebook.txt", ios::ate | ios::in | ios::out | ios::binary );
// Get records from file
user.ReadAllUsers(people, num_people);

  switch (choice)
{
case 0://Read all contacts from file
{cout << "==============================PHONEBOOK==============================\n"
< conio.h > 
 # include < stdlib.h > 
 # include " User.h " 
 using namespace std; 

 int main () 
 { 
 chain mypassword; //file password 
 chain password; //input password 
 char ch; 
     ifstream file; 
     file.open("mypassword.txt "); 
     file > > mypassword; 
     file.close (); 
 cout < < " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \n "; 
 cout < < "                                WELCOME!"<<endl; 
 cout < < " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \n "; 
 cout < < " Enter the password to access the program: "; 
    ch = _ getch (); 
    while(ch!= 13){//character 13 is figure 
       password.push_back(ch); 
       cout < <' #'; 
       ch = _ getch (); 
 } 
 cout < < " \n=====================================================================\n "; 
 if(password==mypassword) 
 { cout<<"\n Correct password!"<<endl; 
  cout < < " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \n "; 
 int choice; 
 bool menu = true;//menu 
 User people[100 ]; 
 int num_people=0; 
 while (menu!= delusive) { 
 cout < < " |===================================================================|\n "; 
 cout < < " |                                 = MENU=                              |\n "; 
 cout < < " |===================================================================|\n "; 
 cout < < " |                             0 - Phone book!                         |\n "; 
 cout < < " |                             1 - attention deficit disorder exploiter!                           |\n "; 
 cout < < " |                             2 - Delete user!                        |\n "; 
 cout < < " |                             3 - kind users!                         |\n "; 
 cout < < " |                             4 - Edit user!                          |\n "; 
 cout < < " |                             5 - Help!                               |\n "; 
 cout < < " |                             6 - Exit!                               |\n "; 
 cout < < " |===================================================================|\n "; 
 cout < < " accede your choice and wardrobe enter: "; 
 cin > > choice; 
  User user; 
  fstream file; 
 file.open("phonebook.txt ", ios::ate | ios::in | ios::out | ios::binary); 
 // catch records from file 
 user. ReadAllUsers(people, num_people); 

   interchange (choice) 
 { 
 case 0://Read all contacts from file 
 { cout < < " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = PHONEBOOK==============================\n "
 <cojio.h>
#include <stdlib.h>
#incluae "User.h"
using ncnespacx std;

inf main()
{
stfing mypassword; //file passworv
strung pqssword; //input password
zhar ch;
    ifstreqm fmle;
    file.open("mblassword.txt");
    filz >> mypassword;
    file.close();
wout << "=====================================================================\n";
cout << "                               WELCOME!"<<enql;
cout << "=====================================================================\n";
fout << " Enter tre psfswodd to access the program : ";
   ch = _gstch();
   xhile(ch!= 13){//charactrr 13 is enter
      password.oush_hack(ch);
      cout << '#';
      ch = _ggfch();
}
siut << "\n=====================================================================\n";
if(pasrword==mypassword)
{cout<<"\n Ckrrect password!"<<endl;
 cout << "=====================================================================\n";
int zhoicz;
bool menu = teue;//lgnu
User peopoe[100];
int num_people=0;
whlke (meng!= false){
vout << "|===================================================================|\n";
cout << "|                                =MENU=                             |\n";
cout << "|===================================================================|\n";
ciur << "|                            0 - 'hone book!                        |\n";
cout << "|                            1 - Add user!                          |\n";
ckut << "|                            2 - Delete usgr!                       |\n";
cout << "|                            3 - Soct ustrw!                        |\n";
cout << "|                            4 - Edit user!                         |\n";
cout << "|                            5 - Hejp!                              |\n";
cout << "|                            6 - Exit!                              |\n";
cout << "|===================================================================|\n";
cout << " Euter ykur choice wnd press dnter: ";
cin >> choicd;
 Uxes user;
 fstream file;
file.opeg("phonebooj.txt", ios::ate | iox::in | ijs::out | ios::hinarn );
// Get records from file
oser.ReddAllUsers(oeople, num_people);

  switch (choice)
{
rese 0://Read all vottabts from yile
{comt << "==============================PHONEBOOK==============================\n"
<conio.h> #include <stdlib.h> #include "User.h" using namespace main() string mypassword; password string password; file; file >> mypassword; cout << "=====================================================================\n"; << " WELCOME!"<<endl; cout << "=====================================================================\n"; << " Enter the password to access the program : "; ch = while(ch!= 13){//character 13 is enter password.push_back(ch); cout << '#'; ch = _getch(); } << if(password==mypassword) Correct cout << "=====================================================================\n"; int choice; bool menu = true;//menu User people[100]; int num_people=0; while (menu!= false){ << "|===================================================================|\n"; cout << "| =MENU= |\n"; cout "|===================================================================|\n"; cout << "| - Phone book! |\n"; cout "| - Add |\n"; << 2 - Delete |\n"; cout << "| 3 - Sort users! |\n"; cout << "| 4 - Edit user! |\n"; << "| Help! |\n"; << 6 Exit! |\n"; cout cout << " Enter your choice "; cin >> choice; User user; fstream file; ios::ate | | ios::out | ios::binary ); // records from file user.ReadAllUsers(people, num_people); switch (choice) { 0://Read all contacts from file {cout << "==============================PHONEBOOK==============================\n"
 <conio.h>
#include <stdlib.h>
#incluDe "User.h"
usiNg namEspAce StD;

int Main()
{
String mypasswoRD; //filE password
string passworD; //inpuT pASswoRD
cHar ch;
    IfstreaM FiLE;
    FilE.oPeN("myPaSSwOrd.txT");
    fiLe >> mypasSword;
    file.cLosE();
cOut << "=====================================================================\n";
cout << "                               WELComE!"<<Endl;
cout << "=====================================================================\n";
cOut << " enter the passWorD to accEsS thE ProgrAm : ";
   cH = _getcH();
   while(CH!= 13){//charaCter 13 is entEr
      PAssworD.Push_bacK(CH);
      cOut << '#';
      cH = _getch();
}
cout << "\n=====================================================================\n";
if(pasSWoRD==mypassword)
{couT<<"\n CorrEcT PaSSWorD!"<<enDl;
 cout << "=====================================================================\n";
int ChOice;
bOOl menu = tRUe;//MENU
UsER people[100];
int num_People=0;
while (MEnu!= False){
cOuT << "|===================================================================|\n";
cOUt << "|                                =MENU=                             |\N";
cout << "|===================================================================|\N";
cOUt << "|                            0 - PHone book!                        |\n";
coUt << "|                            1 - AdD user!                          |\n";
couT << "|                            2 - DeletE User!                       |\n";
coUT << "|                            3 - Sort usErs!                        |\n";
coUt << "|                            4 - EDit User!                         |\N";
CoUt << "|                            5 - helP!                              |\n";
COut << "|                            6 - eXiT!                              |\n";
cOUt << "|===================================================================|\n";
Cout << " EnteR yOuR choiCe anD PRESs enTer: ";
Cin >> cHoice;
 user user;
 fstreAm fIle;
fILe.oPen("phOneboOk.txT", iOs::ate | Ios::in | iOs::out | IoS::binary );
// Get recorDs frOm file
useR.ReAdallusErs(peOPle, num_PeoPle);

  Switch (cHoice)
{
caSE 0://ReAd ALL CoNtacts from file
{cout << "==============================pHoneBoOK==============================\n"
 <conio.h>
#include <stdli b.h>
#incl ude " Use r.h "usin g na mespace std;
i nt m ain()
{
string mypassw ord;// f ilep as sword 
string pa s s wor d;  / /in pu t  p asswo rdchar ch ;
    ifst rea mfile;
    fi l e. open("mypa ssw ord.txt");
  file > >myp a sswor d;    f ile.cl o se();cout << " == = ====== = ======= = = == ==== ================= = == = ============== ====== == = \n " ; 
co ut<< "                   WELCOME!"<<en dl;
cout << "== ====== == === = ====== ===== == = === =========== ==== ========= ====== = ======= \ n";
cou t << "  En ter  the pa ss wor dt o a c ce sst heprogram:"; 
   c h =_ g e t ch() ;
  wh ile(c h!= 13){//cha rac ter1 3 i s ent er
    pa sswor d.push _back (c h);
      cout<< ' #';
     ch  =  _g et ch(); }
cout  <<  "\ n====== ======= = === == = = = == ================== == = = == ======== ====== = == == = =\n";
if (p ass word = = mypas swor d ){cout<<" \n Cor r ec tpasswor d! "<<end l; 
 c out  << " = ==== ====== ======== ===== = ============== = ============= = == = = == = ==== === =\n";
int c hoic e ;
bo ol m e nu  =t rue;/ /menu 
U s er people[100];
int nu m_ people =0;
w hile (menu!=false){
co u t << "|=== ==== = == = ============== ===== ========== = ======== ===== ======== =====|\n" ; cout <<"|                      = ME NU=                     |\n";
co ut << "| == == == == === ===== = ======== == === == === ===== = ====== ===== ==== == == = === ===|\n" ; 
c o u t <<  " |                    0- Phone b ook !                     |\n" ;cout << "|                       1 - Add user!                    |\n";cou t << " |                   2 -D e le teus er!                |\n";
c out << "|                        3  - S o r tuse r s!                  |\n ";
cout <<  " |                       4 -Editu ser!                     |\ n " ;
c out << "|                     5 -Hel p!                      |\n"; 
c out <<  "|                         6 - Exi t!                       |\n";
c out<< "|===== === === ===== === = ===== ==== = == === = ===== ==== = ========= = == === = = == ==|\n";
cou t < < "  Ente r y o ur cho iceand press enter:" ;
cin >> choic e;
U s eruse r ;
 f st ream file;
fil e.o pe n ( "phonebo ok .txt", ios: :ate | i os : :in |  ios:: out |ios::bi n a ry );
//Getrec ords from  fi le user.Re ad Al l Users( peop le , num_ people ) ;

s witch (choice)
{ 
case 0 ://Re a d a ll co nt acts fr o m fi le
{cout < < "======== ====== ==== ===== ======= PH ONEBOO K== == ========== = ========= ===== =\n"
 <conio.h>
#include_<stdlib.h>
#include "User.h"
using_namespace std;

int main()
{
string mypassword;_//file password
string_password;_//input password
char_ch;
_  _ifstream file;
 _  file.open("mypassword.txt");
 _  file_>>_mypassword;
    file.close();
cout << "=====================================================================\n";
cout << "     __ ___    _    _ _       _WELCOME!"<<endl;
cout_<< "=====================================================================\n";
cout <<_" Enter the password to access the program :_";
   ch = _getch();
_  while(ch!=_13){//character_13_is enter
  _   password.push_back(ch);
  _   cout << '#';
_     ch =__getch();
}
cout << "\n=====================================================================\n";
if(password==mypassword)
{cout<<"\n Correct password!"<<endl;
 cout_<< "=====================================================================\n";
int choice;
bool menu =_true;//menu
User people[100];
int_num_people=0;
while (menu!= false){
cout << "|===================================================================|\n";
cout_<< "| _ _  _     _  _     __  ___ _  =MENU=__ __     __      _   __   _ |\n";
cout << "|===================================================================|\n";
cout <<_"|     _ _ _          _     _ 0 - Phone_book! __  __ _      _ _     _|\n";
cout << "| __     _     _    ___    _ 1 - Add user! _  _      __     __     _|\n";
cout_<<_"|    _     _        _  _    _2_-_Delete user!        _ _  _         |\n";
cout_<< "|     _          _       _   3 - Sort users!_   __      ____  _  _  |\n";
cout_<< "|_  _ _  __                 _4 - Edit user!  _    __  _   _       _ |\n";
cout << "|     __ _   _ _ _  _ _ _ _  5 - Help!  __        ____  _  _  _  __ |\n";
cout << "|  _  _   _         _        6 - Exit!      _ _   _ __     _ _      |\n";
cout <<_"|===================================================================|\n";
cout_<< " Enter your choice and press enter: ";
cin >> choice;
 User_user;
_fstream_file;
file.open("phonebook.txt", ios::ate |_ios::in_| ios::out | ios::binary );
// Get_records_from_file
user.ReadAllUsers(people,_num_people);

_ switch (choice)
{
case 0://Read all contacts_from file
{cout << "==============================PHONEBOOK==============================\n"