Merge branch 'master' into alexdev
This commit is contained in:
commit
d5c6c52a03
2 changed files with 126 additions and 1 deletions
125
DBAppV2.cpp
Normal file
125
DBAppV2.cpp
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void yourAccount()
|
||||||
|
{
|
||||||
|
cout<<"name: yourName"<<endl;
|
||||||
|
cout<<"other stuff related to this user\n\n"<<endl;
|
||||||
|
//somehow display user information
|
||||||
|
// int choice;
|
||||||
|
// cin>>choice;
|
||||||
|
cout<<"0. Return to main menu"<<endl;
|
||||||
|
cout<<"\n\nEnter choice:";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void goToBoard()
|
||||||
|
{
|
||||||
|
cout<<"Board x"<<endl;
|
||||||
|
// int choice;
|
||||||
|
// cin>>choice;
|
||||||
|
cout<<"0. Return to main menu"<<endl;
|
||||||
|
cout<<"\n\nEnter choice:";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void boardList()
|
||||||
|
{
|
||||||
|
cout<<"Showing all boards:"<<endl;
|
||||||
|
// int choice;
|
||||||
|
// cin>>choice;
|
||||||
|
cout<<"0. Return to main menu"<<endl;
|
||||||
|
cout<<"\n\nEnter choice:";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void BoardMenu()
|
||||||
|
{
|
||||||
|
int choice;
|
||||||
|
cin>>choice;
|
||||||
|
cout<<"Boards will be displayed soon"<<endl;
|
||||||
|
//do some stuff to display boards
|
||||||
|
cout<<"1. List of boards"<<endl;
|
||||||
|
cout<<"2. Go to board (enter shortcut[first few characters])"<<endl;
|
||||||
|
cout<<"0. Return to main menu"<<endl;
|
||||||
|
cout<<"\n\nEnter choice:";
|
||||||
|
switch(choice)
|
||||||
|
{
|
||||||
|
case 1: boardList();
|
||||||
|
case 2: goToBoard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void showMessages()
|
||||||
|
{
|
||||||
|
cout<<"Messages will be displayed soon"<<endl;
|
||||||
|
//do some stuff to display messages
|
||||||
|
// int choice;
|
||||||
|
// cin>>choice;
|
||||||
|
cout<<"0. Return to main menu"<<endl;
|
||||||
|
cout<<"\n\nEnter choice:";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void showGroups()
|
||||||
|
{
|
||||||
|
cout<<"Groups will be displayed soon"<<endl;
|
||||||
|
//do some stuff to display groups
|
||||||
|
// int choice;
|
||||||
|
// cin>>choice;
|
||||||
|
cout<<"0. Return to main menu"<<endl;
|
||||||
|
cout<<"\n\nEnter choice:";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void mainMenu()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
cout<<"***************"<<endl;
|
||||||
|
cout<<"** Main Menu **"<<endl;
|
||||||
|
cout<<"***************\n\n"<<endl;
|
||||||
|
cout<<"1. Your account"<<endl;
|
||||||
|
cout<<"2. Boards"<<endl;
|
||||||
|
cout<<"3. Messages"<<endl;
|
||||||
|
cout<<"4. Groups\n"<<endl;
|
||||||
|
cout<<"Enter choice: ";
|
||||||
|
int choice;
|
||||||
|
cin>>choice;
|
||||||
|
|
||||||
|
switch (choice)
|
||||||
|
{
|
||||||
|
case 1: yourAccount();
|
||||||
|
case 2: BoardMenu();
|
||||||
|
case 3: showMessages();
|
||||||
|
case 4: showGroups();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
cout<<"***************************************"<<endl;
|
||||||
|
cout<<"Welcome to our BBS "<<endl;
|
||||||
|
cout<<"***************************************"<<endl;
|
||||||
|
|
||||||
|
cout<<"** Enter BBS **"<<endl;
|
||||||
|
cout<<"1. Login"<<endl;
|
||||||
|
cout<<"2. Request new account\n\n";
|
||||||
|
cout<<"Enter choice: ";
|
||||||
|
int choice;
|
||||||
|
cin>>choice;
|
||||||
|
|
||||||
|
|
||||||
|
if (choice == 1)
|
||||||
|
{
|
||||||
|
cout<<"ramera"<<endl;
|
||||||
|
mainMenu();
|
||||||
|
}
|
||||||
|
else {cout<<"oops";}
|
||||||
|
}
|
||||||
|
|
Reference in a new issue