Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,312 members, 7,808,051 topics. Date: Thursday, 25 April 2024 at 06:02 AM

C++ Console Database - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / C++ Console Database (1979 Views)

I Need Help On Oop Project Using C# Console-base Application (2) (3) (4)

(1) (Reply)

C++ Console Database by GoodMuyis(m): 9:10am On May 07, 2009
[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"wink;
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"wink;
cout <<endl;
cout << " These Are Your Records"<<endl;
ifstream file2 ("Console DataBase File.rar"wink;
while(! file2.eof() )
{

getline(file2, storage);
cout <<" " <<storage <<endl;
}
file2.close();
system("PAUSE"wink;
goto intro;
}

else if(x==3) {
system("CLS"wink;
cout <<" -----WELL DONE-----"<<endl;
cout <<endl;
cout <<" Thanks For Destroying The DataBase Rrecord"<<endl;
cout<<endl;
system("PAUSE"wink;
ofstream filedel("Console dataBase File.rar",ios :: trunc);
filedel.close();
goto intro;
}
//Exiting application
else if(x==4){
system("CLS"wink;
cout << " Good Bye !!! " <<endl;
system("PAUSE"wink;
system("EXIT"wink;
}
//When invalid key is pressed
else{
cout<<endl;
cout << "You are Trying To Do Notting"<<endl;
cout<<endl;
system("PAUSE"wink;
goto intro;
}




return 0;
}

Re: C++ Console Database by nzenze(m): 3:31pm On May 07, 2009
please bro i dont know anything abt programming but i need a mailer wud u help me wit dat or refer me 2 sum1 08068289392.thnx
Re: C++ Console Database by GoodMuyis(m): 8:04pm On May 12, 2009
as soon i get it i will let u know

but it will be limited to C++

(1) (Reply)

Subject Combination For Computer Science / Integrate Paystack On Android / CBT Web Application. A Competent Developer Needed.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.