COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
|
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
Go to the source code of this file.
Classes | |
struct | PhoneRec |
Functions | |
int | add_record (PhoneRec pb[], int nRec) |
void | grow_phonebook (PhoneRec *&pb, int &pb_size, int n) |
int | load_phonebook (string filename, PhoneRec *&pb, int &pb_size) |
int | main () |
void | print_phonebook (PhoneRec pb[], int nRec) |
int | save_phonebook (string filename, PhoneRec pb[], int nRec) |
int | search_phonebook (string str, PhoneRec pb[], int nRec) |
char | selection_menu () |
void | sort_phonebook (PhoneRec pb[], int nRec) |
string | upper_case (string str) |
int add_record | ( | PhoneRec | pb[], |
int | nRec ) |
Definition at line 254 of file phonebook.cpp.
References PhoneRec::name, and PhoneRec::phone_no.
Referenced by main().
void grow_phonebook | ( | PhoneRec *& | pb, |
int & | pb_size, | ||
int | n ) |
Definition at line 290 of file phonebook.cpp.
Referenced by load_phonebook(), and main().
int load_phonebook | ( | string | filename, |
PhoneRec *& | pb, | ||
int & | pb_size ) |
Definition at line 138 of file phonebook.cpp.
References grow_phonebook().
Referenced by main().
int main | ( | void | ) |
Definition at line 47 of file phonebook.cpp.
References add_record(), grow_phonebook(), load_phonebook(), print_phonebook(), save_phonebook(), search_phonebook(), selection_menu(), and sort_phonebook().
void print_phonebook | ( | PhoneRec | pb[], |
int | nRec ) |
Definition at line 171 of file phonebook.cpp.
References PhoneRec::name, and PhoneRec::phone_no.
Referenced by main().
int save_phonebook | ( | string | filename, |
PhoneRec | pb[], | ||
int | nRec ) |
Definition at line 234 of file phonebook.cpp.
References PhoneRec::name, and PhoneRec::phone_no.
Referenced by main().
int search_phonebook | ( | string | str, |
PhoneRec | pb[], | ||
int | nRec ) |
Definition at line 212 of file phonebook.cpp.
References find(), PhoneRec::name, PhoneRec::phone_no, and upper_case().
Referenced by main().
char selection_menu | ( | ) |
Definition at line 114 of file phonebook.cpp.
Referenced by main().
void sort_phonebook | ( | PhoneRec | pb[], |
int | nRec ) |
Definition at line 182 of file phonebook.cpp.
References PhoneRec::name.
Referenced by main().
string upper_case | ( | string | str | ) |
Definition at line 278 of file phonebook.cpp.
Referenced by search_phonebook().