diff --git a/src2/C++程序设计课程设计.doc b/src2/C++程序设计课程设计.doc deleted file mode 100644 index 18aac65..0000000 Binary files a/src2/C++程序设计课程设计.doc and /dev/null differ diff --git a/src2/CheckInterface.cpp b/src2/CheckInterface.cpp deleted file mode 100644 index 2765d0f..0000000 --- a/src2/CheckInterface.cpp +++ /dev/null @@ -1,144 +0,0 @@ -// CheckInterface.cpp: implementation of the CheckInterface class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "CheckInterface.h" - - -bool CheckInterface::check(Person& person, const bool _check_repe) const { - unsigned i = 0, j = 0; //common loop variable - string re_write = ""; //rewrite tel and qq(if valid) into good format - vector temp_str; - bool mailFlag = false; //check mailbox's format -//=============================== - - if (!((strlen(person.name)>0) && (strlen(person.tel)>0) && (strlen(person.addr)>0)) ){ - errorMsg = "Name/Tel/Address is null."; - return false; - } -//=============================== - - if (_check_repe){ //here to use _check_repe only once. - for (i = 0; i < contact_item.size(); i++) - if (strcmp(person.name,&*contact_item[i]->name) == 0){ - errorMsg = "Item already exists."; - return false; - } - } -//=============================== - - for (i = 0; i='0')&&(person.tel[i]<='9') ) || (person.tel[i] == ','))){ - errorMsg = "Unknown character in Tel option."; - return false; - } - } - temp_str = this->part_tq(person, "tel"); - re_write = ""; - for (i = 0; i='0')&&(person.qq[i]<='9') ) || (person.qq[i] == ','))){ - errorMsg = "Unknown character in QQ option."; - return false; - } - temp_str.clear(); - temp_str = this->part_tq(person, "qq"); - for (i = 0; i temp_vec = part_tq(index, "tel"); - for (unsigned i = 0; i CheckInterface::part_tq(const Person& person, const char* const TEL_QQ) const { - vector rtn_vec; - string src_str; - string temp_str = ""; - if (strcmp(TEL_QQ,"tel") == 0) - src_str = person.tel; - else if (strcmp(TEL_QQ,"qq") == 0) - src_str = person.qq; - else - return rtn_vec; - - for (unsigned i = 0; i 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "Person.h" - -class CheckInterface -{ -private: - vector part_tq(const Person&, const char* const) const; -public: - virtual ~CheckInterface(){}; - bool check(Person&, const bool _check_repe) const; - bool check_exact(const Person&, const string) const; //check if index.name == info_str -}; - -#endif // !defined(AFX_CHECKINTERFACE_H__ABFADC84_DBE2_4985_9360_97CF317116D0__INCLUDED_) diff --git a/src2/Contact.cpp b/src2/Contact.cpp deleted file mode 100644 index 4320c38..0000000 --- a/src2/Contact.cpp +++ /dev/null @@ -1,108 +0,0 @@ - -#include "stdafx.h" -#include "Contact.h" - -extern vector contact_item; -extern string errorMsg; - -Contact::Contact() -{ - MainFunctionsNum = 5; - refresh(); -} - -Contact::~Contact() -{ - int freei = contact_item.size(); - for (int i = 0; i 0){ - cout<<"\t"<name; - info_check += ".ctt"; - if (info_check == fileinfo.name) - contact_item.push_back(temp_p); - } - - } while (_findnext(hFile, &fileinfo) == 0); - _findclose(hFile); - } - else{ - if (!CreateDirectory(dir, NULL)) return -1; - } - return contact_item.size(); -} - diff --git a/src2/Contact.h b/src2/Contact.h deleted file mode 100644 index 5eb0827..0000000 --- a/src2/Contact.h +++ /dev/null @@ -1,33 +0,0 @@ -// Contact.h: Application Library -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_Contact_H__578FBE4B_85A0_4A32_B651_7CF4D553E488__INCLUDED_) -#define AFX_Contact_H__578FBE4B_85A0_4A32_B651_7CF4D553E488__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - - -#include "ContactInterface.h" -#include "ContactInit.h" -#include "MainNewMenu.h" -#include "MainDelMenu.h" -#include "MainMdfMenu.h" -#include "MainVewMenu.h" - - -class Contact : public ContactInterface, public ContactInit -{ -private: - MainStrategy* setMainStrategy(int); //override from ContactInterface - void removeMainStrategy(MainStrategy*); //... - int refresh() const; //override from ContactInit - void welcome() const; //... -public: - Contact(); - ~Contact(); -}; - -#endif // !defined(AFX_Contact_H__578FBE4B_85A0_4A32_B651_7CF4D553E488__INCLUDED_) diff --git a/src2/ContactInit.h b/src2/ContactInit.h deleted file mode 100644 index b14a1fe..0000000 --- a/src2/ContactInit.h +++ /dev/null @@ -1,20 +0,0 @@ -// ContactInit.h: Frame Gallary -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_CONTACTINIT_H__5C8BC83A_4BE8_4C6A_A36F_6CF4CC06AA7B__INCLUDED_) -#define AFX_CONTACTINIT_H__5C8BC83A_4BE8_4C6A_A36F_6CF4CC06AA7B__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -class ContactInit -{ -public: - virtual ~ContactInit(){}; - virtual int refresh() const = 0; - virtual void welcome() const= 0; -}; - -#endif // !defined(AFX_CONTACTINIT_H__5C8BC83A_4BE8_4C6A_A36F_6CF4CC06AA7B__INCLUDED_) diff --git a/src2/ContactInterface.cpp b/src2/ContactInterface.cpp deleted file mode 100644 index 2255a3c..0000000 --- a/src2/ContactInterface.cpp +++ /dev/null @@ -1,32 +0,0 @@ - -#include "stdafx.h" -#include "ContactInterface.h" - -extern vector contact_item; -extern string errorMsg; - -int ContactInterface::main_menu(){ - char rtn_int; - int fuckin_stupid = 0; - cin.clear(); - cin.sync(); - do{ - system("cls"); - readFile(".\\io\\MainMenu.io"); - if (fuckin_stupid != 0) - cout<<"\t\tError Inputing!\n"; - cout<<"\tEnter number[1-"<'0' + MainFunctionsNum)); - - mainStrategy = setMainStrategy(rtn_int-'0'); - if (mainStrategy == NULL){ - return -1; - } - mainStrategy->doMainStrategy(); - removeMainStrategy(mainStrategy); - return 0; -} diff --git a/src2/ContactInterface.h b/src2/ContactInterface.h deleted file mode 100644 index 6125be1..0000000 --- a/src2/ContactInterface.h +++ /dev/null @@ -1,29 +0,0 @@ -// ContactInterface.h: Frame Gallary -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_CONTACTINTERFACE_H__61397655_84DB_48A0_A5E4_041E75321807__INCLUDED_) -#define AFX_CONTACTINTERFACE_H__61397655_84DB_48A0_A5E4_041E75321807__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "MainStrategy.h" -#include "CheckInterface.h" -#include "PrtMenuInterface.h" - -class ContactInterface : public PrtMenuInterface -{ -private: - MainStrategy* mainStrategy; - virtual MainStrategy* setMainStrategy(int) = 0; - virtual void removeMainStrategy(MainStrategy*) = 0; -protected: - int MainFunctionsNum; -public: - int main_menu(); - virtual ~ContactInterface(){}; -}; - -#endif // !defined(AFX_CONTACTINTERFACE_H__61397655_84DB_48A0_A5E4_041E75321807__INCLUDED_) diff --git a/src2/MainDelMenu.cpp b/src2/MainDelMenu.cpp deleted file mode 100644 index 8d4e182..0000000 --- a/src2/MainDelMenu.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// MainDelMenu.cpp: implementation of the MainDelMenu class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "MainDelMenu.h" - -MainDelMenu::doMainStrategy() -{ - int num = contact_item.size(); - int index = 0; - string addr = ".\\contact\\"; - system("cls"); - cout< 1){ - printAll(); - cout<<"\n\tEnter the INDEX(1 - "<>index; - if ((index<0) || (index>num)){ - cout<<"\n\n\t\tError Input!\n"; - cin.clear(); - cin.sync(); - getch(); - index = 0; - } - } - else if ( num == 1) - index = 1; - if (index == 0) - return 0; - index--; - print_prsn(*contact_item[index],"=====Delete Contact====================\n",true); - delete_prsn(*contact_item[index]); - cin.clear(); - cin.sync(); - getchar(); - return 0; -} \ No newline at end of file diff --git a/src2/MainDelMenu.h b/src2/MainDelMenu.h deleted file mode 100644 index f24c976..0000000 --- a/src2/MainDelMenu.h +++ /dev/null @@ -1,21 +0,0 @@ -// MainDelMenu.h: Application Library -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINDELMENU_H__59F8280E_220C_4D11_9B6E_96B22BB96034__INCLUDED_) -#define AFX_MAINDELMENU_H__59F8280E_220C_4D11_9B6E_96B22BB96034__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "MainStrategy.h" - -class MainDelMenu : public MainStrategy -{ -public: - virtual ~MainDelMenu(){}; - int doMainStrategy(); -}; - -#endif // !defined(AFX_MAINDELMENU_H__59F8280E_220C_4D11_9B6E_96B22BB96034__INCLUDED_) diff --git a/src2/MainMdfMenu.cpp b/src2/MainMdfMenu.cpp deleted file mode 100644 index e97d34c..0000000 --- a/src2/MainMdfMenu.cpp +++ /dev/null @@ -1,41 +0,0 @@ -// MainMdfMenu.cpp: implementation of the MainMdfMenu class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "MainMdfMenu.h" - -MainMdfMenu::doMainStrategy() -{ - int num = contact_item.size(); - int index = 0; - - system("cls"); - cout< 1){ - printAll(); - cout<<"\n\tEnter the INDEX(1 - "<>index; - if ( (index<0) || (index>num) ){ - cout<<"\n\t\tError Input!\n"; - cin.clear(); - cin.sync(); - getch(); - index = 0; - } - } - else if ( num == 1) - index = 1; - if (index == 0) - return 0; - index--; - - modify_prsn(*contact_item.at(index)); - cin.clear(); - cin.sync(); - getch(); - return 0; -} \ No newline at end of file diff --git a/src2/MainMdfMenu.h b/src2/MainMdfMenu.h deleted file mode 100644 index eb1decb..0000000 --- a/src2/MainMdfMenu.h +++ /dev/null @@ -1,21 +0,0 @@ -// MainMdfMenu.h: Application Library -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINMDFMENU_H__4AF95322_636F_4CB7_B574_C8FB878AFB87__INCLUDED_) -#define AFX_MAINMDFMENU_H__4AF95322_636F_4CB7_B574_C8FB878AFB87__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "MainStrategy.h" - -class MainMdfMenu : public MainStrategy -{ -public: - virtual ~MainMdfMenu(){}; - int doMainStrategy(); -}; - -#endif // !defined(AFX_MAINMDFMENU_H__4AF95322_636F_4CB7_B574_C8FB878AFB87__INCLUDED_) diff --git a/src2/MainNewMenu.cpp b/src2/MainNewMenu.cpp deleted file mode 100644 index 539214b..0000000 --- a/src2/MainNewMenu.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// MainNewMenu.cpp: implementation of the MainNewMenu class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "MainNewMenu.h" - -MainNewMenu::doMainStrategy() -{ - system("cls"); - cout<>t_info.name; - cout<<"Address:"; - cin.clear(); - cin.sync(); - cin>>t_info.addr; - cout<<"*Tel:"; - cin.clear(); - cin.sync(); - cin>>t_info.tel; - - char t_c; - cout<<"\n\tthe following data can be set as NULL.Press ENTER to skip\n\n"; - - cin.clear(); - cin.sync(); - - cout<<"Gender:(M for Male, F for Female)"; - char _c= getchar(); - if (_c != '\n') - t_info.sex = _c; - cin.clear(); - cin.sync(); - - cout<<"Zip:"; - while((t_c = getchar()) != '\n'){ - t_str += t_c; - } - strcpy(t_info.zip,t_str.c_str()); - - cin.clear(); - cin.sync(); - t_str = ""; - - cout<<"Mailbox:"; - while((t_c = getchar()) != '\n'){ - t_str += t_c; - } - strcpy(t_info.mail,t_str.c_str()); - cin.clear(); - cin.sync(); - t_str = ""; - - cout<<"*QQ:"; - while((t_c = getchar()) != '\n'){ - t_str += t_c; - } - strcpy(t_info.qq, t_str.c_str()); - cin.clear(); - cin.sync(); - t_str = ""; - - cout<<"Category:"; - while((t_c = getchar()) != '\n'){ - t_str += t_c; - } - strcpy(t_info.category,t_str.c_str()); - cin.clear(); - cin.sync(); - t_str = ""; - - if(!check(t_info, true) ){ - cout<<"\n\t\t"< 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "MainStrategy.h" - -class MainNewMenu : public MainStrategy -{ -private: - bool create() const; -public: - virtual ~MainNewMenu(){}; - int doMainStrategy(); -}; - -#endif // !defined(AFX_MAINNEWMENU_H__FAE001ED_B300_4102_8F33_09E79DFDAEA6__INCLUDED_) diff --git a/src2/MainStrategy.cpp b/src2/MainStrategy.cpp deleted file mode 100644 index 4acdeab..0000000 --- a/src2/MainStrategy.cpp +++ /dev/null @@ -1,184 +0,0 @@ -// MainStrategy.cpp: implementation of the MainStrategy class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "MainStrategy.h" - -void MainStrategy::print_prsn(const Person& prt_Person, const string info, bool refresh) const{ - system("cls"); - cout<name<<" TEL: "<<&*contact_item[i]->tel<<" ADDR: "<<&*contact_item[i]->addr<print_prsn(t_info,"=====Modify Contact====================\n",true); - cout<<"\n\n\t\tReally want to modify?[y/n]: "; - cin.clear(); - cin.sync(); - y_n = getch(); - if ((y_n == 'y') || (y_n == 'Y')){ - if(!check(t_info, false) ){ - cout<<"\n\t\tInfomation Error!"; - return false; - } - else{ - FILE *fp = fopen(addr.c_str(),"wb+"); - if (fp == NULL ){ - cout<<"\n\t\tError opening file!\n"; - return false; - } - else - if (fwrite(&t_info,sizeof(Person), 1, fp) != 1){ - cout<<"\n\t\tError writing to file!\n"; - return false; - } - else{ - cout<<"\n\t\tModify succeed!\n"; - fclose(fp); - } - } - } - else - cout<<"\n\t\tCanceled!\n"; - return true; -} \ No newline at end of file diff --git a/src2/MainStrategy.h b/src2/MainStrategy.h deleted file mode 100644 index d8baa9b..0000000 --- a/src2/MainStrategy.h +++ /dev/null @@ -1,28 +0,0 @@ -// MainStrategy.h: Frame Gallary -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINSTRATEGY_H__EC9C2730_7A1B_40AF_AB90_CC8AC25EC1B5__INCLUDED_) -#define AFX_MAINSTRATEGY_H__EC9C2730_7A1B_40AF_AB90_CC8AC25EC1B5__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "CheckInterface.h" - -class MainStrategy : public CheckInterface -{ -public: - virtual ~MainStrategy(){}; - virtual int doMainStrategy() = 0; -protected: - void printAll() const; - void print_prsn(const Person&, const string, bool) const; - bool delete_prsn(Person&) const; - bool modify_prsn(Person&) const; //Way to modify a spefic Person member -}; - -//extern vector contact_item; - -#endif // !defined(AFX_MAINSTRATEGY_H__EC9C2730_7A1B_40AF_AB90_CC8AC25EC1B5__INCLUDED_) diff --git a/src2/MainTestMenu.cpp b/src2/MainTestMenu.cpp deleted file mode 100644 index f49003b..0000000 --- a/src2/MainTestMenu.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// MainTestMenu.cpp: implementation of the MainTestMenu class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "MainTestMenu.h" - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -MainTestMenu::MainTestMenu() -{ - -} - -MainTestMenu::~MainTestMenu() -{ - -} diff --git a/src2/MainTestMenu.h b/src2/MainTestMenu.h deleted file mode 100644 index b6d67dc..0000000 --- a/src2/MainTestMenu.h +++ /dev/null @@ -1,26 +0,0 @@ -// MainTestMenu.h: interface for the MainTestMenu class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINTESTMENU_H__4F0A9680_D41C_411A_B456_680B37EB8308__INCLUDED_) -#define AFX_MAINTESTMENU_H__4F0A9680_D41C_411A_B456_680B37EB8308__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "MainStrategy.h" - -class MainTestMenu : public MainStrategy -{ -public: - MainTestMenu(); - virtual ~MainTestMenu(); - virtual int doMainStrategy(){ - cout<<"test!\n"; - getch(); - return 0; - } -}; - -#endif // !defined(AFX_MAINTESTMENU_H__4F0A9680_D41C_411A_B456_680B37EB8308__INCLUDED_) diff --git a/src2/MainVewMenu.cpp b/src2/MainVewMenu.cpp deleted file mode 100644 index a71cd5d..0000000 --- a/src2/MainVewMenu.cpp +++ /dev/null @@ -1,32 +0,0 @@ -// MainVewMenu.cpp: implementation of the MainVewMenu class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "MainVewMenu.h" - -MainVewMenu::MainVewMenu(){ - ViewFunctionsNum = 5; -} - -ViewStrategy* MainVewMenu::setViewStrategy(int slct_num){ - - switch(slct_num){ - case 1: - return new ViewExactMenu(); - case 2: - return new ViewFuzzyMenu(); - case 3: - return new ViewCategoryMenu(); - case 4: - return new ViewAllMenu(); - case 5: - break; - } - return NULL; -} - -void MainVewMenu::removeViewStrategy(ViewStrategy* p){ - delete p; -} - diff --git a/src2/MainVewMenu.h b/src2/MainVewMenu.h deleted file mode 100644 index 9798e9a..0000000 --- a/src2/MainVewMenu.h +++ /dev/null @@ -1,29 +0,0 @@ -// MainVewMenu.h: Application Library -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINVEWMENU_H__30EDC353_618B_4196_A8BB_4A59557068CD__INCLUDED_) -#define AFX_MAINVEWMENU_H__30EDC353_618B_4196_A8BB_4A59557068CD__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "MainVewMenuInterface.h" - -#include "ViewExactMenu.h" -#include "ViewAllMenu.h" -#include "ViewCategoryMenu.h" -#include "ViewFuzzyMenu.h" - -class MainVewMenu : public MainVewMenuInterface -{ -private: - ViewStrategy* setViewStrategy(int); - void removeViewStrategy(ViewStrategy*); -public: - MainVewMenu(); - virtual ~MainVewMenu(){}; -}; - -#endif // !defined(AFX_MAINVEWMENU_H__30EDC353_618B_4196_A8BB_4A59557068CD__INCLUDED_) diff --git a/src2/MainVewMenuInterface.cpp b/src2/MainVewMenuInterface.cpp deleted file mode 100644 index 2629d8a..0000000 --- a/src2/MainVewMenuInterface.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// MainVewMenuInterface.cpp: implementation of the MainVewMenuInterface class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "MainVewMenuInterface.h" - -void sleep(){ - Sleep(20); - return; -} - -int MainVewMenuInterface::view(Person* v_Person) const{ - if (v_Person == NULL) - return -1; - bool refresh = true; - string addr = ".\\contact\\"; - int fuckin_stupid = 0; - int slct_num = 0; - do{ - print_prsn(*v_Person,"=====VIEW Contact====================\n",refresh); - if (refresh){ - readFile(".\\io\\View.io",sleep); - } - else{ - readFile(".\\io\\View.io"); - } - cin.clear(); - cin.sync(); - if (fuckin_stupid != 0) - cout<<"\t\tError Inputing!\n"; - cout<<"\tEnter number[1-3] to select the corresponding function: "; - cin.clear(); - cin.sync(); - slct_num = getch(); - fuckin_stupid++; - refresh = false; - }while((slct_num<'1') || (slct_num>'3')); - - switch (slct_num){ - case '1': - delete_prsn(*v_Person); - cin.clear(); - cin.sync(); - getch(); - break; - case '2': - modify_prsn(*v_Person); - cin.clear(); - cin.sync(); - getch(); - break; - case '3': - break; - } - return 0; -} - -int MainVewMenuInterface::doMainStrategy() -{ - int fuckin_stupid = 0; - char slct_num = 0; - do{ - system("cls"); - readFile(".\\io\\ViewMenu.io"); - - if (fuckin_stupid != 0) - cout<<"\t\tError Inputing!\n"; - cout<<"\tEnter number[1-"<'0' + ViewFunctionsNum)); - - viewStrategy = setViewStrategy(slct_num - '0'); - if (viewStrategy == NULL) - return -1; - view(viewStrategy->doViewStrategy()); - removeViewStrategy(viewStrategy); - return 0; -} - diff --git a/src2/MainVewMenuInterface.h b/src2/MainVewMenuInterface.h deleted file mode 100644 index 8a57857..0000000 --- a/src2/MainVewMenuInterface.h +++ /dev/null @@ -1,31 +0,0 @@ -// MainVewMenuInterface.h: Frame Gallary -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINVEWMENUINTERFACE_H__7A32F346_890E_45E1_941B_4FC6A6A3714A__INCLUDED_) -#define AFX_MAINVEWMENUINTERFACE_H__7A32F346_890E_45E1_941B_4FC6A6A3714A__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "MainStrategy.h" -#include "ViewStrategy.h" -#include "PrtMenuInterface.h" - -class MainVewMenuInterface : public MainStrategy, public PrtMenuInterface -{ -private: - ViewStrategy* viewStrategy; - - virtual int view(Person* v_Person) const; //View a Person member with details - virtual ViewStrategy* setViewStrategy(int) = 0; - virtual void removeViewStrategy(ViewStrategy*) = 0; -protected: - int ViewFunctionsNum; -public: - virtual ~MainVewMenuInterface(){}; - int doMainStrategy(); -}; - -#endif // !defined(AFX_MAINVEWMENUINTERFACE_H__7A32F346_890E_45E1_941B_4FC6A6A3714A__INCLUDED_) diff --git a/src2/Person.cpp b/src2/Person.cpp deleted file mode 100644 index 58e5c37..0000000 --- a/src2/Person.cpp +++ /dev/null @@ -1,19 +0,0 @@ - -#include "stdafx.h" -#include "Person.h" - -Person::Person() -{ - strcpy(this->addr,""); - strcpy(this->category,""); - strcpy(this->mail, ""); - strcpy(this->name, ""); - strcpy(this->qq, ""); - this->sex = '\0'; - strcpy(this->tel, ""); - strcpy(this->zip, ""); -} - -Person::~Person() -{ -} \ No newline at end of file diff --git a/src2/Person.h b/src2/Person.h deleted file mode 100644 index 4fb22a4..0000000 --- a/src2/Person.h +++ /dev/null @@ -1,38 +0,0 @@ -// Person.h: Frame Gallary -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_Person_H__4EDC1B44_F6DC_404A_ADA9_E56095080841__INCLUDED_) -#define AFX_Person_H__4EDC1B44_F6DC_404A_ADA9_E56095080841__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#define MAXNAME 100 -#define MAXTEL 80 -#define MAXADDR 100 -#define MAXZIP 10 -#define MAXMAIL 80 -#define MAXQQ 40 -#define MAXCTGY 20 - -class Person -{ -public: - Person(); - ~Person(); - char name[MAXNAME]; - char sex; - char tel[MAXTEL]; - char addr[MAXADDR]; - char zip[MAXZIP]; - char mail[MAXMAIL]; - char qq[MAXQQ]; - char category[MAXCTGY]; -}; - -extern vector contact_item; -extern string errorMsg; - -#endif // !defined(AFX_Person_H__4EDC1B44_F6DC_404A_ADA9_E56095080841__INCLUDED_) diff --git a/src2/PrtMenuInterface.cpp b/src2/PrtMenuInterface.cpp deleted file mode 100644 index 46f95b6..0000000 --- a/src2/PrtMenuInterface.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// PrtMenuInterface.cpp: implementation of the PrtMenuInterface class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "PrtMenuInterface.h" - -bool PrtMenuInterface::readFile(const char* file, void(*events)()) const{ - char line[1024]; - memset(line, 0, 1024); - FILE* fp = fopen(file,"r"); - if (fp == NULL){ - return false; - } - while(!feof(fp)){ - fgets(line, 1024, fp); - cout< 1000 -#pragma once -#endif // _MSC_VER > 1000 - -class PrtMenuInterface -{ -protected: - virtual bool readFile(const char*, void(*)() = NULL) const; -public: - virtual ~PrtMenuInterface(){}; -}; - -#endif // !defined(AFX_PRTMENUINTERFACE_H__77F54599_9711_43E8_97E8_278F62DD0880__INCLUDED_) diff --git a/src2/README.md b/src2/README.md deleted file mode 100644 index 60aff32..0000000 --- a/src2/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# contacts -c++ 课程设计 diff --git a/src2/ViewAllMenu.cpp b/src2/ViewAllMenu.cpp deleted file mode 100644 index f12fdcd..0000000 --- a/src2/ViewAllMenu.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// ViewAllMenu.cpp: implementation of the ViewAllMenu class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ViewAllMenu.h" - -Person* ViewAllMenu::doViewStrategy(){ - int num = contact_item.size(); - vector chosen_item; - - ViewStrategy::all_vew(); - - for (int i = 0;iname<<" TEL: "<<&*contact_item[i]->tel<<" ADDR: "<<&*contact_item[i]->addr< 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "ViewStrategy.h" - -class ViewAllMenu : public ViewStrategy -{ -public: - virtual ~ViewAllMenu(){}; - Person* doViewStrategy(); -}; - -#endif // !defined(AFX_VIEWALLMENU_H__8C79467E_E8F5_483F_8EBE_66DD4CE77A44__INCLUDED_) diff --git a/src2/ViewCategoryMenu.cpp b/src2/ViewCategoryMenu.cpp deleted file mode 100644 index 7426920..0000000 --- a/src2/ViewCategoryMenu.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// ViewCategoryMenu.cpp: implementation of the ViewCategoryMenu class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ViewCategoryMenu.h" - -Person* ViewCategoryMenu::doViewStrategy(){ - string info_str = ViewStrategy::category_vew(); - int num = contact_item.size(); - vector chosen_item; - - for (int i = 0; i < num; i++){ - if (strcmp(&*contact_item[i]->category,info_str.c_str()) == 0 ){ - chosen_item.push_back(i); - cout<<"("<name<<" TEL: "<<&*contact_item[i]->tel<<" ADDR: "<<&*contact_item[i]->addr< 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "ViewStrategy.h" - -class ViewCategoryMenu : public ViewStrategy -{ -public: - virtual ~ViewCategoryMenu(){}; - Person* doViewStrategy(); -}; - -#endif // !defined(AFX_VIEWCATEGORYMENU_H__48B023E6_1B4C_4082_A1E2_BB55EEC3B766__INCLUDED_) diff --git a/src2/ViewExactMenu.cpp b/src2/ViewExactMenu.cpp deleted file mode 100644 index 6532b31..0000000 --- a/src2/ViewExactMenu.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// ViewExactMenu.cpp: implementation of the ViewExactMenu class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ViewExactMenu.h" - -Person* ViewExactMenu::doViewStrategy(){ - string info_str = ViewStrategy::title_vew("=====Exact Query Contact===============", "\tEnter infomation that needs to be querying: "); - int num = contact_item.size(); - vector chosen_item; - - for (int i = 0; i < num; i++){ - if ( check_exact(*contact_item[i], info_str)){ - chosen_item.push_back(i); - cout<<"("<name<<" TEL: "<<&*contact_item[i]->tel<<" ADDR: "<<&*contact_item[i]->addr< 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "ViewStrategy.h" - -class ViewExactMenu : public ViewStrategy -{ -public: - virtual ~ViewExactMenu(){}; - Person* doViewStrategy(); -}; - -#endif // !defined(AFX_VIEWEXACTMENU_H__33A9D84C_B321_4F0C_A59B_3777BF3AE004__INCLUDED_) diff --git a/src2/ViewFuzzyMenu.cpp b/src2/ViewFuzzyMenu.cpp deleted file mode 100644 index 6c22139..0000000 --- a/src2/ViewFuzzyMenu.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// ViewFuzzyMenu.cpp: implementation of the ViewFuzzyMenu class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ViewFuzzyMenu.h" - -Person* ViewFuzzyMenu::doViewStrategy(){ - string info_str = ViewStrategy::title_vew("=====Fuzzy Query Contact===============", "\tEnter infomation that needs to be querying: "); - int num = contact_item.size(); - vector chosen_item; - - for (int i = 0; i < num; i++){ - if ((strstr(&*contact_item[i]->addr,info_str.c_str()) != NULL) || (strstr(&*contact_item[i]->name ,info_str.c_str()) != NULL) || (strstr(&*contact_item[i]->tel ,info_str.c_str()) != NULL) ) { - chosen_item.push_back(i); - cout<<"("<name<<" TEL: "<<&*contact_item[i]->tel<<" ADDR: "<<&*contact_item[i]->addr< 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "ViewStrategy.h" - -class ViewFuzzyMenu : public ViewStrategy -{ -public: - virtual ~ViewFuzzyMenu(){}; - Person* doViewStrategy(); -}; - -#endif // !defined(AFX_VIEWFUZZYMENU_H__D10D5C93_EEF6_40EA_AEBB_C289EE09C1EF__INCLUDED_) diff --git a/src2/ViewStrategy.cpp b/src2/ViewStrategy.cpp deleted file mode 100644 index 03521bb..0000000 --- a/src2/ViewStrategy.cpp +++ /dev/null @@ -1,98 +0,0 @@ -// ViewStrategy.cpp: implementation of the ViewStrategy class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ViewStrategy.h" - -string ViewStrategy::title_vew(const char* title, const char* descp) const{ - string info_str; - - system("cls"); - cout<>info_str; - cout<& chosen_item) const{ - unsigned index = 0; - - if (chosen_item.size() == 0){ - cout<<"\n\t\tNo Item Found!\n"; - cin.clear(); - cin.sync(); - getch(); - return NULL; - } - else { - if (chosen_item.size() == 1){ - Sleep(400); - index = 1; - } - else{ - cout<<"\n\tEnter the INDEX(1 - "<>index; - if (index>chosen_item.size()){ - return NULL; - } - }//if (chosen_item.size() == 1) - if (index > 0){ - return contact_item.at(chosen_item.at(index-1)); - } - return NULL; - }//if (chosen_item.size() == 0) -} - -void ViewStrategy::all_vew() const{ - system("cls"); - cout< cur_ctg; - string tmp_ctg; - bool add_ctg; - unsigned i = 0,j = 0; - - system("cls"); - cout<category; - if (tmp_ctg == "") - tmp_ctg = "Unset"; - add_ctg = true; - for (j = 0; j>info_str; - if ((info_str == "Unset") || (info_str == "unset")) - info_str = ""; - - cout< 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "CheckInterface.h" - -class ViewStrategy : public CheckInterface -{ -protected: - string title_vew(const char*, const char*) const; //for exact/fuzzy view - void all_vew() const; - string category_vew() const; - Person* anythingView(vector&) const; -public: - virtual ~ViewStrategy(){}; - virtual Person* doViewStrategy() = 0; -}; - -#endif // !defined(AFX_VIEWSTRATEGY_H__EC4D2837_CB82_4C72_90B0_0F5B88767A63__INCLUDED_) diff --git a/src2/contact/Author.ctt b/src2/contact/Author.ctt deleted file mode 100644 index 4c57559..0000000 Binary files a/src2/contact/Author.ctt and /dev/null differ diff --git a/src2/contact/Ms.Shrimp.ctt b/src2/contact/Ms.Shrimp.ctt deleted file mode 100644 index 8dfff9b..0000000 Binary files a/src2/contact/Ms.Shrimp.ctt and /dev/null differ diff --git a/src2/contacts.dsp b/src2/contacts.dsp deleted file mode 100644 index 71854e6..0000000 --- a/src2/contacts.dsp +++ /dev/null @@ -1,237 +0,0 @@ -# Microsoft Developer Studio Project File - Name="contacts" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=contacts - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "contacts.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "contacts.mak" CFG="contacts - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "contacts - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "contacts - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "contacts - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c -# ADD BASE RSC /l 0x804 /d "NDEBUG" -# ADD RSC /l 0x804 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "contacts - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c -# ADD BASE RSC /l 0x804 /d "_DEBUG" -# ADD RSC /l 0x804 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "contacts - Win32 Release" -# Name "contacts - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\CheckInterface.cpp -# End Source File -# Begin Source File - -SOURCE=.\Contact.cpp -# End Source File -# Begin Source File - -SOURCE=.\ContactInterface.cpp -# End Source File -# Begin Source File - -SOURCE=.\main.cpp -# End Source File -# Begin Source File - -SOURCE=.\MainDelMenu.cpp -# End Source File -# Begin Source File - -SOURCE=.\MainMdfMenu.cpp -# End Source File -# Begin Source File - -SOURCE=.\MainNewMenu.cpp -# End Source File -# Begin Source File - -SOURCE=.\MainStrategy.cpp -# End Source File -# Begin Source File - -SOURCE=.\MainVewMenu.cpp -# End Source File -# Begin Source File - -SOURCE=.\MainVewMenuInterface.cpp -# End Source File -# Begin Source File - -SOURCE=.\Person.cpp -# End Source File -# Begin Source File - -SOURCE=.\PrtMenuInterface.cpp -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.cpp -# ADD CPP /Yc"stdafx.h" -# End Source File -# Begin Source File - -SOURCE=.\ViewAllMenu.cpp -# End Source File -# Begin Source File - -SOURCE=.\ViewCategoryMenu.cpp -# End Source File -# Begin Source File - -SOURCE=.\ViewExactMenu.cpp -# End Source File -# Begin Source File - -SOURCE=.\ViewFuzzyMenu.cpp -# End Source File -# Begin Source File - -SOURCE=.\ViewStrategy.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\CheckInterface.h -# End Source File -# Begin Source File - -SOURCE=.\Contact.h -# End Source File -# Begin Source File - -SOURCE=.\ContactInit.h -# End Source File -# Begin Source File - -SOURCE=.\ContactInterface.h -# End Source File -# Begin Source File - -SOURCE=.\MainDelMenu.h -# End Source File -# Begin Source File - -SOURCE=.\MainMdfMenu.h -# End Source File -# Begin Source File - -SOURCE=.\MainNewMenu.h -# End Source File -# Begin Source File - -SOURCE=.\MainStrategy.h -# End Source File -# Begin Source File - -SOURCE=.\MainVewMenu.h -# End Source File -# Begin Source File - -SOURCE=.\MainVewMenuInterface.h -# End Source File -# Begin Source File - -SOURCE=.\person.h -# End Source File -# Begin Source File - -SOURCE=.\PrtMenuInterface.h -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File -# Begin Source File - -SOURCE=.\ViewAllMenu.h -# End Source File -# Begin Source File - -SOURCE=.\ViewCategoryMenu.h -# End Source File -# Begin Source File - -SOURCE=.\ViewExactMenu.h -# End Source File -# Begin Source File - -SOURCE=.\ViewFuzzyMenu.h -# End Source File -# Begin Source File - -SOURCE=.\ViewStrategy.h -# End Source File -# End Group -# End Target -# End Project diff --git a/src2/contacts.dsw b/src2/contacts.dsw deleted file mode 100644 index 80a9d29..0000000 --- a/src2/contacts.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "contacts"=".\contacts.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/src2/contacts.ncb b/src2/contacts.ncb deleted file mode 100644 index b75a271..0000000 Binary files a/src2/contacts.ncb and /dev/null differ diff --git a/src2/contacts.opt b/src2/contacts.opt deleted file mode 100644 index a93615a..0000000 Binary files a/src2/contacts.opt and /dev/null differ diff --git a/src2/contacts.plg b/src2/contacts.plg deleted file mode 100644 index cf104a3..0000000 --- a/src2/contacts.plg +++ /dev/null @@ -1,147 +0,0 @@ - - -
-

Build Log

-

---------------------Configuration: contacts - Win32 Debug-------------------- -

-

Command Lines

-Creating temporary file "C:\Users\dell\AppData\Local\Temp\RSP7BD3.tmp" with contents -[ -/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/contacts.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"G:\Contact\CheckInterface.cpp" -"G:\Contact\Contact.cpp" -"G:\Contact\ContactInterface.cpp" -"G:\Contact\main.cpp" -"G:\Contact\MainDelMenu.cpp" -"G:\Contact\MainMdfMenu.cpp" -"G:\Contact\MainNewMenu.cpp" -"G:\Contact\MainStrategy.cpp" -"G:\Contact\MainVewMenu.cpp" -"G:\Contact\MainVewMenuInterface.cpp" -"G:\Contact\Person.cpp" -"G:\Contact\PrtMenuInterface.cpp" -"G:\Contact\ViewAllMenu.cpp" -"G:\Contact\ViewCategoryMenu.cpp" -"G:\Contact\ViewExactMenu.cpp" -"G:\Contact\ViewFuzzyMenu.cpp" -"G:\Contact\ViewStrategy.cpp" -] -Creating command line "cl.exe @C:\Users\dell\AppData\Local\Temp\RSP7BD3.tmp" -Creating temporary file "C:\Users\dell\AppData\Local\Temp\RSP7BD4.tmp" with contents -[ -/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/contacts.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c -"G:\Contact\StdAfx.cpp" -] -Creating command line "cl.exe @C:\Users\dell\AppData\Local\Temp\RSP7BD4.tmp" -Creating temporary file "C:\Users\dell\AppData\Local\Temp\RSP7BD5.tmp" with contents -[ -kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/contacts.pdb" /debug /machine:I386 /out:"Debug/contacts.exe" /pdbtype:sept -.\Debug\CheckInterface.obj -.\Debug\Contact.obj -.\Debug\ContactInterface.obj -.\Debug\main.obj -.\Debug\MainDelMenu.obj -.\Debug\MainMdfMenu.obj -.\Debug\MainNewMenu.obj -.\Debug\MainStrategy.obj -.\Debug\MainVewMenu.obj -.\Debug\MainVewMenuInterface.obj -.\Debug\Person.obj -.\Debug\PrtMenuInterface.obj -.\Debug\StdAfx.obj -.\Debug\ViewAllMenu.obj -.\Debug\ViewCategoryMenu.obj -.\Debug\ViewExactMenu.obj -.\Debug\ViewFuzzyMenu.obj -.\Debug\ViewStrategy.obj -] -Creating command line "link.exe @C:\Users\dell\AppData\Local\Temp\RSP7BD5.tmp" -

Output Window

-Compiling... -StdAfx.cpp -Compiling... -CheckInterface.cpp -d:\program files (x86)\microsoft visual studio\vc98\include\vector(48) : warning C4786: '??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@IABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' : identifier was truncated to '255' characters in the browser information - G:\Contact\CheckInterface.cpp(12) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(61) : warning C4786: '??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' : identifier was truncated to '255' characters in the browser information - G:\Contact\CheckInterface.cpp(12) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(103) : warning C4786: '?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE?AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - G:\Contact\CheckInterface.cpp(12) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(105) : warning C4786: '?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QBE?AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - G:\Contact\CheckInterface.cpp(12) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(107) : warning C4786: '?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE?AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - G:\Contact\CheckInterface.cpp(12) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(108) : warning C4786: '?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QBE?AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - G:\Contact\CheckInterface.cpp(12) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -G:\Contact\CheckInterface.cpp(110) : warning C4786: 'std::reverse_iterator,std::allocator > const *,std::basic_string,std::allocator >,std::basic_string,std::allocator > const &,std::basic_string,std::allocator > const *,int>' : identifier was truncated to '255' characters in the debug information -G:\Contact\CheckInterface.cpp(110) : warning C4786: 'std::reverse_iterator,std::allocator > *,std::basic_string,std::allocator >,std::basic_string,std::allocator > &,std::basic_string,std::allocator > *,int>' : identifier was truncated to '255' characters in the debug information -Contact.cpp -ContactInterface.cpp -main.cpp -MainDelMenu.cpp -MainMdfMenu.cpp -MainNewMenu.cpp -MainStrategy.cpp -MainVewMenu.cpp -MainVewMenuInterface.cpp -Person.cpp -PrtMenuInterface.cpp -ViewAllMenu.cpp -ViewCategoryMenu.cpp -ViewExactMenu.cpp -ViewFuzzyMenu.cpp -ViewStrategy.cpp -d:\program files (x86)\microsoft visual studio\vc98\include\vector(48) : warning C4786: '??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@IABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' : identifier was truncated to '255' characters in the browser information - G:\Contact\ViewStrategy.cpp(65) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(61) : warning C4786: '??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' : identifier was truncated to '255' characters in the browser information - G:\Contact\ViewStrategy.cpp(65) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(103) : warning C4786: '?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE?AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - G:\Contact\ViewStrategy.cpp(65) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(105) : warning C4786: '?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QBE?AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - G:\Contact\ViewStrategy.cpp(65) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(107) : warning C4786: '?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE?AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - G:\Contact\ViewStrategy.cpp(65) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -d:\program files (x86)\microsoft visual studio\vc98\include\vector(108) : warning C4786: '?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QBE?AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - G:\Contact\ViewStrategy.cpp(65) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -G:\Contact\ViewStrategy.cpp(98) : warning C4786: 'std::reverse_iterator,std::allocator > const *,std::basic_string,std::allocator >,std::basic_string,std::allocator > const &,std::basic_string,std::allocator > const *,int>' : identifier was truncated to '255' characters in the debug information -G:\Contact\ViewStrategy.cpp(98) : warning C4786: 'std::reverse_iterator,std::allocator > *,std::basic_string,std::allocator >,std::basic_string,std::allocator > &,std::basic_string,std::allocator > *,int>' : identifier was truncated to '255' characters in the debug information -Generating Code... -d:\program files (x86)\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector,std::allocator >,std::allocator,std::allocator > > >::vector,std::allocator >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information -d:\program files (x86)\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector,std::allocator >,std::allocator,std::allocator > > >::~vector,std::allocator >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information -d:\program files (x86)\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector,std::allocator >,std::allocator,std::allocator > > >::vector,std::allocator >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information -d:\program files (x86)\microsoft visual studio\vc98\include\vector(52) : warning C4786: 'std::vector,std::allocator >,std::allocator,std::allocator > > >::vector,std::allocator >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information -d:\program files (x86)\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector,std::allocator >,std::allocator,std::allocator > > >::~vector,std::allocator >,std::allocator,std::allocator > > >' : identifier was truncated to '255' characters in the debug information -Linking... -Creating temporary file "C:\Users\dell\AppData\Local\Temp\RSP8ACA.tmp" with contents -[ -/nologo /o"Debug/contacts.bsc" -.\Debug\StdAfx.sbr -.\Debug\CheckInterface.sbr -.\Debug\Contact.sbr -.\Debug\ContactInterface.sbr -.\Debug\main.sbr -.\Debug\MainDelMenu.sbr -.\Debug\MainMdfMenu.sbr -.\Debug\MainNewMenu.sbr -.\Debug\MainStrategy.sbr -.\Debug\MainVewMenu.sbr -.\Debug\MainVewMenuInterface.sbr -.\Debug\Person.sbr -.\Debug\PrtMenuInterface.sbr -.\Debug\ViewAllMenu.sbr -.\Debug\ViewCategoryMenu.sbr -.\Debug\ViewExactMenu.sbr -.\Debug\ViewFuzzyMenu.sbr -.\Debug\ViewStrategy.sbr] -Creating command line "bscmake.exe @C:\Users\dell\AppData\Local\Temp\RSP8ACA.tmp" -Creating browse info file... -

Output Window

- - - -

Results

-contacts.exe - 0 error(s), 21 warning(s) -
- - diff --git a/src2/io/MainMenu.io b/src2/io/MainMenu.io deleted file mode 100644 index f633f08..0000000 --- a/src2/io/MainMenu.io +++ /dev/null @@ -1,15 +0,0 @@ - - - ==========MAIN MENU=========== - | - ---New___1------------------- - | - ---Delete_2------------------ - | - ---Modify_3------------------ - | - ---View___4------------------ - | - ---Quit___5------------------ - - \ No newline at end of file diff --git a/src2/io/View.io b/src2/io/View.io deleted file mode 100644 index ad332c2..0000000 --- a/src2/io/View.io +++ /dev/null @@ -1,10 +0,0 @@ - - - - ====Options======= -| - -------Delete_1--- -| - -------Modify_2--- -| - -------Back___3--- diff --git a/src2/io/ViewMenu.io b/src2/io/ViewMenu.io deleted file mode 100644 index 40dc16d..0000000 --- a/src2/io/ViewMenu.io +++ /dev/null @@ -1,22 +0,0 @@ - - ==========VIEW CONTACT======== - | - ---********------------------ - | - ---********------------------ - | - ---********------------------ - | - ---View___*------------------ - | | - -----Exact query__1------- - | | - -----Fuzzy query__2------- - | | - -----Category_____3------- - | | - -----All__________4------- - | | - -----Back_________5------- - | - ---********------------------ diff --git a/src2/main.cpp b/src2/main.cpp deleted file mode 100644 index cade1a9..0000000 --- a/src2/main.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* -========Program Entry======== -Author: ϶ΰ -Version: 1.2 -Submit Date: 18.06.20 -========================= - */ - -#include "stdafx.h" -#include "Contact.h" - -int main(int argc, char* argv[]) -{ - Contact* my_contact = new Contact(); - ContactInterface* my_interface = my_contact; - ContactInit* my_init = my_contact; - my_init->welcome(); - - while(1){ - my_init->refresh(); - if (my_interface->main_menu() == -1) - break; - } - delete my_contact; - return 0; -} - - - diff --git a/src2/makefile b/src2/makefile deleted file mode 100644 index 948f357..0000000 --- a/src2/makefile +++ /dev/null @@ -1,69 +0,0 @@ -#MakeFile created by automake-OvenVan - -BIN = contact.exe -CC = gcc -CFLAG = -g3 -Wall -static-libgcc =std=c++11 -CXX = g++ -CXXFLAG = -g3 -Wall -static-libgcc -std=c++11 -lstdc++ -OBJ = CheckInterface.o Contact.o ContactInterface.o MainDelMenu.o MainMdfMenu.o MainNewMenu.o MainStrategy.o MainTestMenu.o MainVewMenu.o MainVewMenuInterface.o Person.o PrtMenuInterface.o StdAfx.o ViewAllMenu.o ViewCategoryMenu.o ViewExactMenu.o ViewFuzzyMenu.o ViewStrategy.o main.o - -$(BIN): $(OBJ) - $(CXX) $(OBJ) -o $(BIN) - -CheckInterface.o: CheckInterface.cpp - $(CC) -c CheckInterface.cpp -o CheckInterface.o $(CXXFLAG) - -Contact.o: Contact.cpp - $(CC) -c Contact.cpp -o Contact.o $(CXXFLAG) - -ContactInterface.o: ContactInterface.cpp - $(CC) -c ContactInterface.cpp -o ContactInterface.o $(CXXFLAG) - -MainDelMenu.o: MainDelMenu.cpp - $(CC) -c MainDelMenu.cpp -o MainDelMenu.o $(CXXFLAG) - -MainMdfMenu.o: MainMdfMenu.cpp - $(CC) -c MainMdfMenu.cpp -o MainMdfMenu.o $(CXXFLAG) - -MainNewMenu.o: MainNewMenu.cpp - $(CC) -c MainNewMenu.cpp -o MainNewMenu.o $(CXXFLAG) - -MainStrategy.o: MainStrategy.cpp - $(CC) -c MainStrategy.cpp -o MainStrategy.o $(CXXFLAG) - -MainTestMenu.o: MainTestMenu.cpp - $(CC) -c MainTestMenu.cpp -o MainTestMenu.o $(CXXFLAG) - -MainVewMenu.o: MainVewMenu.cpp - $(CC) -c MainVewMenu.cpp -o MainVewMenu.o $(CXXFLAG) - -MainVewMenuInterface.o: MainVewMenuInterface.cpp - $(CC) -c MainVewMenuInterface.cpp -o MainVewMenuInterface.o $(CXXFLAG) - -Person.o: Person.cpp - $(CC) -c Person.cpp -o Person.o $(CXXFLAG) - -PrtMenuInterface.o: PrtMenuInterface.cpp - $(CC) -c PrtMenuInterface.cpp -o PrtMenuInterface.o $(CXXFLAG) - -StdAfx.o: StdAfx.cpp - $(CC) -c StdAfx.cpp -o StdAfx.o $(CXXFLAG) - -ViewAllMenu.o: ViewAllMenu.cpp - $(CC) -c ViewAllMenu.cpp -o ViewAllMenu.o $(CXXFLAG) - -ViewCategoryMenu.o: ViewCategoryMenu.cpp - $(CC) -c ViewCategoryMenu.cpp -o ViewCategoryMenu.o $(CXXFLAG) - -ViewExactMenu.o: ViewExactMenu.cpp - $(CC) -c ViewExactMenu.cpp -o ViewExactMenu.o $(CXXFLAG) - -ViewFuzzyMenu.o: ViewFuzzyMenu.cpp - $(CC) -c ViewFuzzyMenu.cpp -o ViewFuzzyMenu.o $(CXXFLAG) - -ViewStrategy.o: ViewStrategy.cpp - $(CC) -c ViewStrategy.cpp -o ViewStrategy.o $(CXXFLAG) - -main.o: main.cpp - $(CC) -c main.cpp -o main.o $(CXXFLAG) - diff --git a/src2/stdafx.cpp b/src2/stdafx.cpp deleted file mode 100644 index 8846fd9..0000000 --- a/src2/stdafx.cpp +++ /dev/null @@ -1,10 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// contacts.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" -#include "Contact.h" -#include "Person.h" - -vector contact_item; -string errorMsg; diff --git a/src2/stdafx.h b/src2/stdafx.h deleted file mode 100644 index e58a078..0000000 --- a/src2/stdafx.h +++ /dev/null @@ -1,18 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__F5925CEB_85C9_4293_8D63_288D374D3EDC__INCLUDED_) -#define AFX_STDAFX_H__F5925CEB_85C9_4293_8D63_288D374D3EDC__INCLUDED_ - -#include -#include -#include -#include -#include -#include -#include -using namespace std; - -#endif // !defined(AFX_STDAFX_H__F5925CEB_85C9_4293_8D63_288D374D3EDC__INCLUDED_)