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/DBApp.cpp

87 lines
1.7 KiB
C++
Raw Normal View History

2015-09-27 15:27:14 -05:00
#include <string> // std::string
#include <iostream> // std::cout
#include <sstream> // std::stringstream
#include <vector>
#include <string>
2015-09-28 19:11:26 -05:00
#include "Parser.h"
#include "DBEngine.h"
2015-09-27 15:27:14 -05:00
2015-09-27 15:38:01 -05:00
using namespace std;
/*
2015-09-27 15:27:14 -05:00
int main()
{
cout << "**********************" << endl;
cout << "* Generic Restaurant *" << endl;
cout << "**********************" << endl;
cout << "- Login -" << endl;
cout << "1. Login" << endl;
cout << "2. Request new account" << endl;
cout << "Enter coice: ";
int n;
cin >> n;
string u;
string p;
switch(n)
{
case 1: cout << "- Login -" << endl;
cout << "Enter username: ";
cin >> u;
cout << "Enter password: ";
cin >> p;
// implement user database.
break;
case 2: cout << "Not implemented." << endl;
break; // not implemented.
default: cout << "Not an option." << endl;
return 0;
}
2015-09-27 15:38:01 -05:00
}
2015-09-29 22:02:25 -05:00
*/
void yourAccount()
{
cout<<"name: yourName"<<endl;
}
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;
if (choice == 1)
{
yourAccount();
}
}
int main()
{
cout<<"***************************************"<<endl;
cout<<"Welcome to our BBS "<<endl;
cout<<"***************************************"<<endl;
cout<<"** Enter BBS **"<<endl;
cout<<"1. Login";
cout<<"2. Request new account\n\n";
cout<<"Enter choice";
int choice;
cin>>choice;
if (choice == 1)
{
mainMenu();
}
}