This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
dmspine64backup/DBAppV2.cpp

126 lines
2.2 KiB
C++
Raw Normal View History

2015-09-29 22:49:18 -05:00
#include <iostream>
2015-09-29 22:49:18 -05:00
using namespace std;
/*
2015-09-29 22:49:18 -05:00
void yourAccount()
{
cout<<"name: yourName"<<endl;
cout<<"other stuff related to this user\n\n"<<endl;
//somehow display user information
// int choice;
// cin>>choice;
2015-09-29 22:49:18 -05:00
cout<<"0. Return to main menu"<<endl;
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
void goToBoard()
{
cout<<"Board x"<<endl;
// int choice;
// cin>>choice;
2015-09-29 22:49:18 -05:00
cout<<"0. Return to main menu"<<endl;
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
void boardList()
{
cout<<"Showing all boards:"<<endl;
// int choice;
// cin>>choice;
2015-09-29 22:49:18 -05:00
cout<<"0. Return to main menu"<<endl;
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
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;
2015-09-29 22:49:18 -05:00
cout<<"0. Return to main menu"<<endl;
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
void showGroups()
{
cout<<"Groups will be displayed soon"<<endl;
//do some stuff to display groups
// int choice;
// cin>>choice;
2015-09-29 22:49:18 -05:00
cout<<"0. Return to main menu"<<endl;
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
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";}
}
*/