[center]==== C++ Console DataBase====[/center]
[center]By GoodMuyis[/center]
I design it. get it and change the name to >>
Console DataBase.zip extract it then change the name of the extracted file to[b]Console DataBase.exe[/b] and run it
if you need explanation on the code requst for it throug reply
rate i for me

?
// My Console Database
#include <iostream>
#include <fstream>
#include <string>
#ifdef WIN32
#include <windows.h>
#endif
using namespace std;
//declaring variables
int x, y, z;
string name, school, clas, age, storage;
int main(){
intro:
//color
#ifdef WIN32
HANDLE hstdo;
hstdo = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hstdo, FOREGROUND_GREEN|FOREGROUND_INTENSITY);
#endif
//color ends
system("CLS"
;
cout << " This Is Simple C++ Console DataBase" <<endl;
cout <<endl;
cout << " |||-------> By GOODMUYIS <------|||" <<endl;
cout <<endl;
cout << " Infomation Reqiured Are Name, School, Class, Age" <<endl;
cout <<endl;
cout << " (1) Enter Record" <<endl;
cout <<endl;
cout << " (2) Display Records" <<endl;
cout <<endl;
cout << " (3) Clean DataBase" <<endl;
cout <<endl;
cout << " (4) Quit" <<endl;
cout <<endl;
cout << " What Do You Want To Do: ? ";
//intro ends
cin >> x;
//getting input from user
if(x==1){
cout << " Enter A 'Name' And Press Enter: ";
getline (cin,name);
getline (cin,name);
cout << " Enter The School Name: ";
getline (cin, school);
cout << " Enter The Class: ";
getline (cin, clas);
cout << " Enter The age: ";
getline (cin, age);
cout<<endl;
//writting to DataBase file
ofstream file ("Console DataBase File.rar", ios::app);
file <<endl;
file << "Name: " << name << endl;
file << "School: " << school << endl;
file << "Class: " << clas <<endl;
file << "Age: " << age << endl;
file << "=====================" <<endl;
file.close();
goto intro;
}
//Displaying DataBase info
else if(x==2){
system("CLS"
;
cout <<endl;
cout << " These Are Your Records"<<endl;
ifstream file2 ("Console DataBase File.rar"
;
while(! file2.eof() )
{
getline(file2, storage);
cout <<" " <<storage <<endl;
}
file2.close();
system("PAUSE"
;
goto intro;
}
else if(x==3) {
system("CLS"
;
cout <<" -----WELL DONE-----"<<endl;
cout <<endl;
cout <<" Thanks For Destroying The DataBase Rrecord"<<endl;
cout<<endl;
system("PAUSE"
;
ofstream filedel("Console dataBase File.rar",ios :: trunc);
filedel.close();
goto intro;
}
//Exiting application
else if(x==4){
system("CLS"
;
cout << " Good Bye !!! " <<endl;
system("PAUSE"
;
system("EXIT"
;
}
//When invalid key is pressed
else{
cout<<endl;
cout << "You are Trying To Do Notting"<<endl;
cout<<endl;
system("PAUSE"
;
goto intro;
}
return 0;
}