How To Make A Database In Dev C++

How To Make A Database In Dev C++Make

I'm new to C++ programming. I'm trying to make a database that stores the information without overwrite it. I want this program to store the client’s selection in somewhere that doesn't change and also that creates a new storage for the new value any time the client enters a new selection instead of overwriting it. I did something like that in my code but any time the program runs again and the client enters a new selection, the client’s selection is overwritten with the new value. I don’t know if it’s possible to do that (store the client’s selection in somewhere where doesn't change) with C++. I've been reading and I think I can create a database for my program.
THIS IS MY CODE:
#include <iostream>
#include <string>
using namespace std;
// FUNCTIONS
void mainMenu();
void laptopsMenu();
void pcsMenu();
void tabletsMenu();
//Global Variables
string userOrder = ' ';
void main ()
{
string personType = ' ';
do
{
cout << 'Welcome to the Computer Store!' << endl << endl;
cout << 'Are you a client or manager?' << endl;
cin >> personType;
if ( personType 'client' )
{
mainMenu(); // Calls Function mainMenu
}
else if ( personType 'manager' )
{
cout << endl << 'The client ordered a ' << userOrder << '.'<< endl << endl;
}
}
while ( personType 'client' | personType 'manager' );
cout << endl << 'Thank you for your business. BYE !!! ' << endl;
system('pause');
}
//**********************************************************
// FUNCTIONS
//**********************************************************
// mainMenu Function
//***************************************
void mainMenu ()
{
int mainMenuOption = 0;
cout << endl << 'Computer Menu Options: ' << endl;
cout << '1) Laptop.' << endl;
cout << '2) PC.' << endl;
cout << '3) Tablet.' << endl;
cout << '4) Exit.' << endl << endl;
cout << 'What kind of computer would you like to order?' << endl;
cin >> mainMenuOption;
switch ( mainMenuOption )
{
case 1:
laptopsMenu(); // Calls Function laptopsMenu
break;
case 2:
pcsMenu(); // Calls Function pcsMenu
break;
case 3:
tabletsMenu(); // Calls Function tabletsMenu
break;
default:
cout << 'Thank you for your business. BYE !!! ' << endl;
break;
}
if ( mainMenuOption 1 | mainMenuOption 2 | mainMenuOption 3 )
{
cout << endl <<'You just ordered a ' << userOrder << '.' << endl;
cout << 'Thank you for your selection.' << endl;
cout << 'Your order is at the front desk.' << endl << endl;
}
}
// laptopsMenu Function
//***************************************
void laptopsMenu()
{
int laptopsMenuOption = 0;
cout << endl << 'Laptop Selection Menu' << endl;
cout << '1) MacBook' << endl;
cout << '2) Asus' << endl;
cout << '3) Dell' << endl;
cin >> laptopsMenuOption;
switch ( laptopsMenuOption )
{
case 1:
userOrder = 'Laptop MacBook';
break;
case 2:
userOrder = 'Laptop Asus';
break;
case 3:
userOrder = 'Laptop Dell';
break;
}
}
// pcsMenu Function
//***************************************
void pcsMenu()
{
int pcsMenuOption = 0;
cout << endl << 'PC Selection Menu' << endl;
cout << '1) Alienware' << endl;
cout << '2) Gateway' << endl;
cout << '3) Dell' << endl;
cin >> pcsMenuOption;
switch ( pcsMenuOption )
{
case 1:
userOrder = 'PC Alienware';
break;
case 2:
userOrder = 'PC Gateway';
break;
case 3:
userOrder = 'PC Dell';
break;
}
}
// tabletsMenu Function
//***************************************
void tabletsMenu()
{
int tabletsMenuOption = 0;
cout << endl << 'Tablet Selection Menu' << endl;
cout << '1) iPad' << endl;
cout << '2) Nexus 7 (Android)' << endl;
cout << '3) Kindle' << endl;
cin >> tabletsMenuOption;
switch ( tabletsMenuOption )
{
case 1:
userOrder = 'Tablet iPad';
break;
case 2:
userOrder = 'Tablet Nexus 7 (Android)';
break;
case 3:
userOrder = 'Tablet Kindle';
break;
}
}
THANK YOU FOR YOUR HELP
How To Make A Database In Dev C++

How To Make A Database In Dev C Free

Mar 02, 2013  I'm new to C programming. I'm trying to make a database that stores the information without overwrite it. I want this program to store the client’s selection in somewhere that doesn't change and also that creates a new storage for the new value any time the client enters a. C and Mysql database This section is crucial for those who are new to C and Mysql database connection and data manipulation in Windows OS. This short tutorial will guide you step by step to connect to Mysql database using C or C programming language. Create C or C project and add library files to the Dev-C project option. Dec 12, 2018 Step 3: Add your IP to the firewall. Go to the firewall section for your Database server and add your client IP to the firewall using these steps to make sure we can establish a successful connection: At this point, you have configured your Azure SQL DB and are ready to connect from your C code.