# include "Member. H"
# include "MemberMenu. H"
Int _tmain (int arg c, _TCHAR * argv [])
{
MemberMenu * musMember=new MemberMenu ();
Member * mem;
String name;
String password;
Int choise.
While (1)
{
Cout & lt; <"Welcome to use * * * 2016 songs management system" & lt;
Cout<& lt;" Please choose the services you need: "& lt;
Cin & gt;> Number;
If (number<1 | | number> 8)
{
Cout<& lt;" Please select the correct operating option!"
continue;
}
The switch (number)
{
Case 1:
Mem=new Member ();
Cout<& lt;" Please enter the name songs: ";
Cin> Mem - & gt; name;
Cout<& lt;" Comments: ";
Cin> Mem - & gt; Score;
MusMember - & gt; AddMem (mem);
system("pause");
System (" CLS ");
break;
Case 2:
Cout<& lt;" Delete the song "& lt;
Cin> name;
If (musMember - & gt; DeleteMem (name))
{
Cout<& lt;" Delete "success & lt;
} the else
{
Cout<& lt;" Delete failed "& lt;
}
system("pause");
break;
Case 3:
Cout<& lt;" Modify the songs name "& lt;
Cin> name;
Mem=new Member ();
Cout<& lt;" Please input the correct song name: "& lt;
Cout<& lt;" Comments: "& lt;
If (musMember - & gt; UpdateMem (name, mem))
{
Cout<& lt;" Modify success "& lt;
{
Cout<& lt;" Modify the failure "& lt;
system("pause");
break;
Case 4:
Cout<& lt;" To find the song name "& lt;
Cin> name;
Choise=musMember - & gt; FindMem (name);
If (choise==1)
{
Cout<& lt;" Could not find "& lt;
} the else
{
Cout<& lt;" OK, found, its location is: "& lt;
system("pause");
break;
Case 5:
Cout<& lt;" Song list "& lt;
system("pause");
break;
Case 6:
MusMember - & gt; SaveData ();
system("pause");
break;
Case 7:
MusMember - & gt; LoadData ();
system("pause");
break;
Case 8:
exit(0);
}
}
return 0;
}
How to add a registration in front of the management system login, after the registration login can directly enter the management system of operation, a great god, just learning c + +
CodePudding user response:
Fyi:From C to C + + Builder menu interface management system of the graphical user interface, a simple address book example Demo
http://blog.163.com/tab_98/blog/static/1192409720158673337998/