C++

C++ is the only language I had studied proffesionally and is my base for studing other languages. I owe a great debt to C++.

Program Sources
Header Files
C++ Projects for 12th Std

Comments

Sriram at 14 Jan, 2007 10:03
HOW CAN I USE A MOUSE USING CONIO.H ONLY ( I'M NOT ALLOWED TO USE GRAPHICS.H)PLEASE REPLY
Reply to this.
Anonymous at 31 Mar, 2008 07:08
#include<stdio.h>
#include<conio.h>
union REGS i,o;
void main()
{
i.x.ax=0; //Initializes mouse
i.x.ax=1; //Displayes mouse
}
best of luck

feel free to call me on 09853800799
or mail me on mukesh_coolguy89@rediffmail.com
Reply to this.
Anonymous at 30 Jul, 2008 11:41
its not work .
error show msg that regs not declared
Reply to this.
aditya at 28 Jan, 2007 10:43
i am having a project coded in c++ of periodic table but i want introduction of that project and its user manual within a hour ..plz help me
Reply to this.
Anonymous at 11 Feb, 2007 06:34
please help me in making c++ projrect on company management
Reply to this.
jhonson at 13 Feb, 2007 12:12
hi sir

i m doing jog as a technical incharge for SATELLITE RECIVER (STB) the korea compony
giive us software for scramble channels change to discramble after download flash software so i wont open BIN FILE and edit my self and make scrabmled channel to discramble so please send me email what can i do for open it please please
Reply to this.
Anonymous at 27 Feb, 2007 07:11

template <typename Comparable>
bool BinarySearchNode<Comparable>::remove( const Comparable & obj,
        BinarySearchNode<Comparable> * & ptr_to_this ) {
    if ( obj == element ) {
        if ( leaf() ) {                              // leaf node
            ptr_to_this = 0;
            delete this;
        } else if ( left() != 0 && right() != 0 ) {  // full node
            element = right() -> find_min();
            right() -> remove( element, right_tree );
        } else {                                     // only one child
            if ( left() != 0 ) {
                ptr_to_this = left();
            } else {
                ptr_to_this = right();
            }
            delete this;
        }

        return true;
    } else if ( obj < element ) {
       if ( left() == 0 ) {
           return false;
       } else {
           return left() -> remove( obj, left_tree );
       }
    } else {
       if ( right() == 0 ) {
           return false;
       } else {
           return right() -> remove( obj, right_tree );
       }
    }
}
Reply to this.
Anonymous at 30 Sep, 2007 07:12
y b like that
Reply to this.
eCho at 29 Apr, 2007 03:59
hey...m a 12th garder..(cbse)..mm ive made games lke hangman n tik tac..
n im familiar wid classes/sttruct/files...
i js need help in a particuar concept
************ ACTIVE SEARCH *********
active search...hw do i program diz...
fr example...derz a list of 100 names
n i need 2 search fr a name lke "HARI"
so wen i type "H"..IMMIDIATLY all da names strtin with "H" shud appear...n wen i type "HA" al names strtin wid HA shud appear instantly..!..
...get wa i mean?..i js need a hint...plzplzpzlpzlpzlzpzl help!...
thnku loads...
eCho
Reply to this.
Ginta at 06 Dec, 2007 06:22
In that case, I think implementing a "trie" could do the work. A trie is some kind of special tree that stores initial keywords for something, and a value of true or false if they are the complete word or a simple prefix. For example:
(EMPTY)
false
A B C D ... Z
| | | | ... |
AC .................................. O
false FALSE
... I ... ... M ...
ACID ZOMBIE
true true

I hope you understand this little example. See more at: en.wikipedia.org/wiki/Trie
true
Reply to this.
Anonymous at 26 Feb, 2008 11:12
i want to run any thing through the LPT Port so please i have not perfect code of LPT Port. please tel me code and how can use it in C programing.
Reply to this.
Adi at 16 Jul, 2007 10:08
I have a 2.10 version of the turboc compiler. I have all the header files i need but the iostream.h. Can anybody tell me where to get it from?
Reply to this.
Anonymous at 27 Jan, 2010 08:21
download new complier googled it
Reply to this.
MAdhan at 03 Aug, 2007 11:35

sir please give a C++ Code for making micky mouse animating
Reply to this.
Anonymous at 14 Aug, 2007 02:44
please tell me how do take back the pointer at the beginning of the file......
i read a file once.... now i wanrt to read it again from starting so it is not workking.
please help
Reply to this.
Anonymous at 01 Sep, 2008 07:46
hi, this is quite simple. All you r supposed to do is use seekg(int) function. it is available in fstream.h
The integer value passed to the function determines the position in the file where you want to go.
For you, you must pass 0 in the arguement to move to the very first place in the file
Good Luck!!
Reply to this.
Anonymous at 16 Jan, 2010 07:26
use seekp()/seekg()functions
syntax:seekp(0,ios::beg)
this will place the pointer @0TH position from the beginig
Reply to this.
Anonymous at 21 Aug, 2007 02:41
please tell me how do take back the pointer at the beginning of the file...... i read a file once.... now i wanrt to read it again from starting so it is not workking. please help
use seekg to move get pointer to read the contents of file again from starting position eg:-

#include <iostream.h>

using namespace std;
int main()
{
fstream fin;
char ch;
fin.open("abc.dat",ios::in||ios::binary);
if(!fin)
{
    cout<<"Error in opening the filen";
    exit(1);
}
while(!fin.eof())
{
   ch = fin.get();
   cout<<ch;
}
//again if you want to read the file from start
fin.seekg(ios:beg);
while(!fin.eof())
{
   ch = fin.get();
   cout<<ch;
}

//close the file stream
fin.close();
return 0;
}//end of main function
Reply to this.
Ginta at 06 Dec, 2007 06:23
Correction: replace ios:beg by ios::beg

:)
Reply to this.
Anonymous at 28 Aug, 2007 09:28
please help me with the source code of a simple banking project....including adding new account,cash deposit,cash withdrawl,balance checking etc...The account number need to be generated automatically....please help me...
Reply to this.
Anonymous at 05 Apr, 2009 04:54
visit the website www.cppforschool.com u will find many project using c++ for students
Reply to this.
Anonymous at 31 Aug, 2007 08:17
I need grphics.h header file..
Where will I get that???
Reply to this.
monaagarwal at 31 Aug, 2007 11:03
i am the student of class 12th. i completed my project calculator,bt i need introduction and conclusion n plz tell me how i submit this project to examiner.i.e which pages i add before this project in which the examiner get happy and give me good marks.
thanks
Reply to this.
Anonymous at 07 Sep, 2007 07:55
hi
your c++ projects r undoubtly great......
but will dey work for cbse?
Reply to this.
Binny V A at 07 Sep, 2007 10:33
Yeah - I was a CBSE student myself.
Reply to this.
Vivek at 14 Sep, 2007 08:23
Hi,
Iam an engineering nstudent.I need a good C++ project
Reply to this.
divya at 20 Sep, 2007 04:24
What is Bln-Co? Can we use c++ to create GUI based application?
Reply to this.
Binny V A at 20 Sep, 2007 07:40
Bin-Co is simply a name for my site. C++ can be used to create GUI applications - but I suggest you use Tcl/Tk instead. Its much easier.
Reply to this.
Nick K at 16 Oct, 2007 08:24
*******HELP********
Hey guyz.... i have a very big task. I have made a program in which i made a STICKMAN which can move left and right easily but.... when i try for diagonal jump i.e. when i press the up & left key both together, the compiler doesnt recognize them together. It either first accepts the up key or the left key...
Can u pls tell me how can i make the figure jump diagonally(projectile)??

pls help!!
pls mail the proggram 2 me at nilay1990@yahoo.com
Reply to this.
Anonymous at 26 Oct, 2007 08:51
hi
need a program on banking softwares with graphics ,files and classes and object plzzzzzzzzz urget send the codes matter of life and death
Reply to this.
Anonymous at 16 Nov, 2007 04:52
I want a project on examination management
Reply to this.
Anonymous at 16 Nov, 2007 04:55
I want a project on examination management
Reply to this.
Anonymous at 12 Dec, 2007 01:55
hi i'm in grade 12th.....n i want a project on multiple choice questions in c++ can any1 help me??
Reply to this.
Anonymous at 26 Jan, 2008 11:21
do one thing
buy or adjust from some one the "together with solutions"
they give a cd along with it and it has two projects :
1.music management
2.multiple choice questions program

edit the code so it may look genuine.
and u are ready.
Reply to this.
Anonymous at 08 Jan, 2008 10:43
explain me the output of this code:
#define sqr(N) N*N
void main()
{int num=3;
cout<<sqr(num-1)<<endl;
cout<<sqr(num+1);
}
Reply to this.
Anonymous at 01 Sep, 2008 07:54
#define sqr(N) N*N
void main()
{int num=3;
cout<<sqr(num-1)<<endl;
cout<<sqr(num+1);
}
#define is used t declare a macros. The difference bw a macros and other variables inc. functions is that a macros is compiled along with the header files before the main program.
Here the macros declares a function that will return the square of the input argument.
Output will be-
4
16
Reply to this.
sumyuktha at 12 Jan, 2008 03:36
I need a project on "LIBRARY MANAGEMENT SYSTEM" plz help by providing source codes.
Thank u.

Reply to this.
Anonymous at 16 Sep, 2008 04:50
Is anybody having a project on "LIBRARY MANAGEMENT SYSTEM" plz help by providing source codes
Reply to this.
Anonymous at 23 Jan, 2008 03:31
plz!!!help me in making the project on LIBRARY MANAGEMENT SYSTEM based on linked list
abhiwarior@yahoo.co.in
Reply to this.
Anonymous at 27 Jan, 2008 01:34
i want a help on project of c++ of class XI
on topic hotel management
Reply to this.
Anonymous at 07 Feb, 2008 08:51
what is use of this pointer?
Reply to this.
Anonymous at 15 Feb, 2008 04:37
I really need help on this one.please help me with source codes of a HOSPITAL REGISTRY SYSTEM as soon as possible-if possible.Thank you!
Reply to this.
Anonymous at 16 Feb, 2008 02:51
plz help by providing code for the following
-Write a function in C++ called shift( ) to rearrange the matrix as shown . Do not
use parallel matrix .
Original Matrix Rearranged Matrix
1 2 -3 -2 -3 -2 1 2
0 -1 2 1 -1 0 2 1
-3 9 -4 4 -3 -4 9 4
Reply to this.
Anonymous at 25 Feb, 2008 02:44
Plz send me a simple project in C++ plzzzzzzzzzz
Reply to this.
Anonymous at 26 Feb, 2008 11:25
Hero, The Game Project [Comment Edited - code moved to new location]
Reply to this.
Anonymous at 11 Mar, 2008 05:45
Hey u should accept the name to be searched say in a array of characters with the name 'usersearch'. Then define an integer variable len that stores strlen(usersearch). Then open the file that contains the 100 names in which u r supposed 2 search and retrieve the names 1 by 1. Let the name retrieved from the file be chkname. Check this condition for all the 100 names in the file:
if (strncmp(usersearch, chkname, len)==0)
{
puts(chkname);
}

I kno it'll kinda take time 2 check 4 all 100 names but i guess thats the simplest logic u can give which will be under ur 12th std cbse syllabus!!

Hope u got me!
Reply to this.
ary at 13 Mar, 2008 07:29
please help me, open my file *.bin. but i'm for editing.
Reply to this.
Anonymous at 17 Mar, 2008 02:00
i need a help on c++ project
the subject of project is--customar which is come into honda showroom and buy a honda product . this all work is done online
plz help me on this topic
Reply to this.
Anonymous at 20 Mar, 2008 03:08
m in XII cbse board n hav comp. sci. ma examz r on 31st mar.......pls help me out........
Reply to this.
Anonymous at 27 Mar, 2008 07:03
I want c or c++ source code for railway management system.Kindly inform this email id.
Reply to this.
Anonymous at 29 Mar, 2008 02:36
DEAR IN NEED CODE FOR SIMPLE BANKING SYSTEM C++ Source code if some one have it please post
thanks
Reply to this.
Anonymous at 08 Apr, 2008 07:39
Can anyone help me to write a fraction calculator prgm in C++ using stack 4 registers namely x y z and r..i have used structure and switch case bt confused
Reply to this.
Viikram at 18 Apr, 2008 08:40
Plzz...some one gimme a source code/link on how to prepare an Examination & Hiring system...accept applications,print them,print ID card with SOME details from application form,print them,conduct exms,compilation of result..
Reply to this.
Anonymous at 13 Jun, 2008 05:38
can u pls send some c++ projects with in two days
Reply to this.
raajbharath at 23 Jun, 2008 11:47
i want to be a game programmer. what should i di for that
?
Reply to this.
Anonymous at 01 Jul, 2008 03:20
please help me... do you have a codes for C++ in banking system??!!!!
Reply to this.
Anonymous at 11 Jul, 2008 08:01
Hey pls help me 4 my 12th class project.I thought of a c++ project in banking .But i don't know how to do it.pls do help me.if you are interested in helping me pls send the project to kuttus_14@yahoo.co.in
Reply to this.
Anonymous at 01 Sep, 2008 12:18
i need a project for my XII cbse containin classes,files etc.
Reply to this.
Anonymous at 16 Sep, 2008 04:47
I need a project on "LIBRARY MANAGEMENT SYSTEM" plz help by providing source codes.
Please do the needful
cnu115@yahoo.co.in
Reply to this.
sourav at 18 Oct, 2008 04:35
hi

very very urgent need by tuesday plz help me to write a c++ code for a institutes course details

it would contain course offered its prices the duration of course n also a condition if any one wants to join in between the duration then wat he should pay and how much it would take
Reply to this.
Anonymous at 01 Dec, 2008 05:05
guys i hav 2 do a pro on quiz.......
pls help.........
Reply to this.
Anonymous at 08 Dec, 2008 09:43
i need TC software for 64-xp.......
mine is not working in this new system.......
Reply to this.
iman at 16 Dec, 2008 04:05
I need a cheese game that written by c++ But i don't know how i can write it
Please help me in this project
Reply to this.
amaan at 23 Dec, 2008 02:25
can any of u guys help me with my computer project? hotel management program but without objects and classes
Reply to this.
amaan at 23 Dec, 2008 02:26
i even want a tc software
Reply to this.
ROHIT at 23 Dec, 2008 11:23
I NEED C++ PROJECT ON METRO RAILWAYS!!!PLZ HELP......
Reply to this.
Anonymous at 03 Jan, 2009 01:47
i am a eleventh class student and need a good c++ program for my school project.i can't use advanced header files like graphics.h etc. so please help me with the programming and reply soon.
Reply to this.
Asim at 14 Jan, 2009 08:37
i need a program on how to find smallest of 3 numbers using terminary operators
Reply to this.
janver at 19 Jan, 2009 02:56
ASIM!this is the codes in your question..but i write in c++,.so relate it.


int n1,n2,n3;
char ans;
main()
{
clrscr();
cout<<"enter first number:";
cin>>n1;
cout<<"enter 2nd number:";
cin>>n2;
cout<<enter 3rd number:";
cin>>3;
if (n1<n2 &n1<n3)
c<<n1<<"is the smallest number";
}
else if (n2<n1 &n2<n3)
{
c<<n2<<is the smallest number:";
}
else
{
c<<n3<<is the highest number:";
}
getche();
}

thats all ..hope it will run!
Reply to this.
janver at 19 Jan, 2009 02:59
c is for cout..sorry.
Reply to this.
Anonymous at 27 Dec, 2009 01:31
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float a,b,c,min;
cout<<"enter 3 real numbers\n";
cin>>a>>b>>c;
min=(a<b)?((a<c)?a:c):((b<c)?b:c);
cout<<min<<"is the smaalest number\n";
getch();
}
//?: is known as ternary operator.??

Reply to this.
janver at 19 Jan, 2009 02:46
can u give codes of banking system in c++..

plZZZz..this my first case study and i don't how to it..plzzzz..
Reply to this.
janver at 19 Jan, 2009 05:46
mr binny V.A. it s possible to use the header file #include "stdafx.h" in cplusplus?

i use it but it was unable to run..isn't it?

thank's!
Reply to this.
naman at 24 Jan, 2009 07:53
I HAVE MADE A C++ PROGRAM ON MUSIC LIBRARY...PLEASE TELL ME ABOUT THE GRAPHICS WHICH I COULD INCLUDE IN MY PROGRAM AS I DON'T HAVE ANY KNOWLEDGE OF GRAPHICS AND HOW TO INCLUDE IT...
PLEASE REPLY AS SOON AS POSSIBLE. IT'S VERY URGENT...
Reply to this.
Hari at 27 Jan, 2009 05:58
Program to accept 2 integers swap by reference.
Reply to this.
Ashwin at 30 Jan, 2009 07:26
Hi I need to make a file compression software same as winzip/winrar using c++, plz help.
Thanks......
Reply to this.
roja at 22 Feb, 2009 09:09
plzzz send hospital management database graphics program in c++
Reply to this.
Anonymous at 26 Feb, 2009 01:27
hi i am kailash. a diploma student.. i want to make a project of my final sem. n my project is "controlling home appliance using c++" i got some idea but it is by using a printer pod but i want to use a us pot can u help me
Reply to this.
roja at 28 Feb, 2009 07:48
plz write program in hospital database management in c++in graphics
Reply to this.
CHRISTIAN NIEBRES at 14 Mar, 2009 01:55
hey good pm how will i able to run the program of STUDENT INFORMATION SYSTEM if i am not able to use graphic
Reply to this.
CHRISTIAN NIEBRES at 14 Mar, 2009 02:03
hi good afternoon... this program that i made can save and search but we need to pass a project that can save search and delete. can you please add delete on my program.. please.
#include <iostream.h>
#include <conio.h>
#include <fstream.h>
#include <iomanip.h>
#include <stdlib.h>
int main()
{

char name[19];
double sn;
const int NIEBRES = 40 ;
char address[35],quality[NIEBRES],price[NIEBRES],expiration[NIEBRES];
int choice;
double requestsn;



do
{

cout << "\nPRODUCT DATA";
cout << "\n\n\n[1] Add & Save Product's Info" << endl;
cout << " [2] Search & View Product's Info" << endl;
cout << " [3] Exit "<< endl;
cout << " \n \nSelect your choice?: " << endl;
cin >> choice;


if (choice == 1)
{

cout << "Enter product name: ";
cin.ignore();
cin.getline(name,19);
cout << endl;
cout << "Enter product serial number: ";
cin >> sn;
cout << endl;
cout << "Enter product manufacturer: ";
cin.ignore();
cin.getline(address,35);
cout << endl;
cout << "Enter product quality: ";
cin >> quality;
cout << endl;
cout << "Enter product price: ";
cin >>price;
cout << endl;
cout << "Enter product expiration date : ";
cin >> expiration;

ofstream outfile;
outfile.open("productdata.txt",ios::app);

outfile << name << endl;
outfile << setprecision(12)<<sn << endl;
outfile << address << endl;
outfile << quality << endl;
outfile << price << endl;
outfile << expiration << endl;


outfile.close();
cout << "Please press any key to continue... " << endl;
getch();



}


if (choice == 2)
{

cout << "Please Input product number : ";
cin >> requestsn;



ifstream infile;
infile.open("productdata.txt");


while(!infile.eof() && infile != '\0')
{

infile.getline(name,19);
infile >> sn;
infile.ignore();
infile.getline(address,35);
infile >> quality;
infile >> price;
infile >> expiration;
infile.ignore();


if(sn == requestsn)
{
cout << "Name : ";
cout << name << endl;
cout << "product Number : ";
cout << setprecision(12)<<sn << endl;
cout << "Manufacturer : ";
cout <<setprecision(40)<< address << endl;
cout << "Quality : ";
cout << quality << endl;
cout << "Price : ";
cout << price << endl;
cout << "Expiration : ";
cout << expiration << endl;

break;
}
}
if(infile.eof() && sn != requestsn)
{
cout << "NO PRODUCT AVAILABLE " << endl;
}


infile.close();
cout << "Press Enter to proceed to the next... " << endl;
getch();

}
}while (choice!=3);

if (choice == 3)
{
exit(1);
}


getch();
return 0;
}
Reply to this.
Anonymous at 06 May, 2009 09:55
i have run these projects but there is the same error in the porjects that :
BGI graphics not supported under windows .
help me .
Reply to this.
Anonymous at 16 May, 2009 01:11
hi.I'm looking for a phone book program that requires all the information bellow :
1)adding new member
2)adding new number
3)saving new number & member
4)searching for the numbers that were saved before
5)removing ability
is there any one who can help me out with it?
my email address is :
oceanograph_2007@yahoo.com
Reply to this.
Neha at 22 May, 2009 11:45
did id easy dude!!! Juz open the file in append mode n perform all dese operations.
Reply to this.
Neha at 22 May, 2009 11:44
Hey guys!!! M makn a projct on company management!!! Plz can u tell me wat all shud I include in it (like employs details, profit/loss)?? Plz reply soon...
Reply to this.
aditya at 18 Jun, 2009 11:55
plzzzzzzzzzzzz help me out from this situation i'm in need of a program that deals with library management and i have very little time left my sir has taught us till classes only please help me out
Reply to this.
Anonymous at 11 Aug, 2009 04:31
For C and C++ Projects Like

1. book-shop
2. Address Book
3. banking
4. LIBRARY
5. hotel reservation
6.hotel management project in c++
7. canteen-management
8. Periodic_Table
9. Payrol Mangement
10. Matrix_Calculator
11. REPORT_CARD_MAKING
12. Shuffle-game
13. Snake-Game
15. Student_Report_Maker
16. Students_Information_System
17. Telephone Billing
18. Telephone Directory
19. Typing Tutor

Please Visit Math4all.info
Reply to this.
geeky at 10 Sep, 2009 09:30
i am required to develop a system to record details of student.
This system should be implemented using structure and array. i am required to develop a structure which contains student details such as Student ID, Student Name, Nationality and Gender.

1st-i have to insert new record
2nd-delete record
3rd-sort record
4th-display record

my question is how to use a structure and array in this program. i haven't done my coding. but i wish to know the steps. i have learned this but not in coding. please show me the way so that i can improve. can i know what's the function of file/io and pointer? thanks
Reply to this.
Anonymous at 14 Sep, 2009 11:43
I AM REQD TO MAKE A PROJECT ON COLLECTION OF TAX FOR MY CLASS 12TH BOARDS...BUT I DONT KNOW HOW TO MAKE IT...NEITHER CAN I FIND IT ANYWHERE ON THE NET...CAN ANYONE PLEASE HELP ME BY TELLING ME HOW TO GO ABOUT IT OR WHERE TO FIND IT ON THE NET ??
Reply to this.
Mohant at 20 Sep, 2009 08:31
can you please send me c++ Project on Railway Management
Reply to this.
Anonymous at 09 Oct, 2009 07:38
during compilation i've got an error as folloows:
identifier'function name'cannot have a type qualifier
Reply to this.
Anonymous at 14 Nov, 2009 10:14
my problem is that i have to submit a project on exam management sysytem coded on c++.....and i dnt understand c++...can u help
Reply to this.
Anonymous at 14 Nov, 2009 10:26
i want "how to make report of c++ projects class xii".please help me.send me reports at anand.kant157@gmail.com
Reply to this.
Anonymous at 01 Dec, 2009 09:35
m a eng student i need a prog on bank account defined in classwith information name ,account numder, type of account ,balance. use constructor for initialing value and destructors.implement functions for deposit,withdrawl,search,insertdeletion n insertion.(please help me out)
Reply to this.
satish at 13 Dec, 2009 10:37
contact me for C/C++,UNIX related training,content development, consulting. email: satty35@gmail.com
Reply to this.
Anonymous at 19 Dec, 2009 10:23
tell me a simple programcode for Library Management System
Reply to this.
berhe at 03 Jan, 2010 09:30
I want project of banking management system or hospital management system using class and files thank u so much for ur help to me.
Reply to this.
sharmistha das at 11 Jan, 2010 09:55
tell me a program for hotel management based on JAVA(GUI).
Reply to this.
Deep at 12 Jan, 2010 12:29
Please SEnd me some C++ projects with complete documention Please help me
i have to submit tomarrow please help .
Reply to this.
Anonymous at 16 Jan, 2010 11:56
please give me its main function today.
all the classes are given here.


class train
{
int number;
int seats_1;
int seats _2;
int seats_3;
public:
train(int i; int j, int k)
{
number=i;
seats_1=j;
seats_2=k;
seats_3=l;
int getnum(void)
{
return number ;
}
int getseats_1(void)
{
return seats_1;
}
int getseats_2(void)
{
return seats_2;
}
int getseats_3(void)
{
return seats_3;
}
};
class reservation:public train
{
int bkd_1;
int bkd_2;
int bkd_3;
public:
int i, j, k, l;
reservation(int i, int j, int k, int l) : train(i, j, k, l)
{ bkd_1=bkd_2=bkd_3=0};
void book(char type, int num);
void cancel(char type, int num);
void dis_status(void);
};
void reservation::book(char type, int num)
{ switch(type)
{ case'1' : bkd_1+=num;
break;
case '2' : bkd_2+=num;
break;
case'3' : bkd_3+=num;
break;
defult : cout<"wrong class"<<"\n";
}
}
void reservation :: cancel(char tper, int num)
{
switch(type)
{
case'1' : bkd_1-=num;
break;
case '2' : bkd_2-=num;
break;
case'3' : bkd_3-=num;
break;
defult : cout<"wrong class"<<"\n";
}
}
void reservation :: disp_status(void)
{
cout<<"\t \t train number : "<<getnum( )<<"\n";
cout<<"class \t total seats \t reserved \t unreserved \n";
int val;
val=getseats_1( );
cout<<"1 \t "<<val<<"\t"<<bkd_1<<"\t"<<val-bkd_1<<"\n";
val=getseats_2( );
cout<<"2 \t "<<val<<"\t"<<bkd_2<<"\t"<<val-bkd_2<<"\n";
val=getseats_3( );
cout<<"3 \t "<<val<<"\t"<<bkd_3<<"\t"<<val-bkd_3<<"\n";
}
int main( )
{ clrscr( );
int num;
cout<<"enter train number:\n";
cin>>num;
cout<<"\n enter total number of seats in 1st class \n";
int s1;
cin>>s1;
cout<<"\n enter total number of seats in 2st class \n";
int s2;
cin>>s2;
cout<<"\n enter total number of seats in 3st class \n";
int s3;
cin>>s3;
reservation tr(int num, int s1, int s2, int s3);
char cl_type;
int choice, seats;
do
{
cout <<"\n main menu \n";
cout<<"1. reservation \";
cout<<"2. cancellation \n";
cout<<"3. display status \n";
cout<<" 4. exit \n";
cout<<"enter your choice :";
cin>>choice;
cout<<"\n";
switch(choice )
{
case 1 : cout<<"which class?(1/2/3):";
cin>>cl_type;
cout<<"\n how many seats?";
cin>>seats;
cout<<"\n";
tr.book(cl_type,seats);
break;
case 2: cout<<"which class?(1/2/3):";
cin>>cl_type;
cout<<"\n howmany seats?";
cin>>"\n";
tr.cancel(cl_type,seats );
break;
case 3 : tr.disp_status);
break;
case 4 : break;
default : cout<<"wrong choice!! \n";
};
}
while(choice>=1&& choice<=3);
return 0;
}
Reply to this.
Ashu at 17 Jan, 2010 10:00
Please SEnd me some C++ projects with complete documention Please help me
i have to submit tomarrow please help I have got no chance scoring good in theory so pls help me to get good marks in practicals but the graphic.h should not be used since we r not taught about it anything
Reply to this.
Anonymous at 26 Jan, 2010 08:32
Please send me some C++ projects with complete documentation on student database. Kindly.
Reply to this.
Anonymous at 01 Feb, 2010 04:22
please give me a computer project which don't include header files like graphics.h,dos.h but include fstream.h and other files for my xiith class board practical now.......
Reply to this.
ANCHAL JOHRI at 02 Feb, 2010 12:01
hiiiiiiiiiiii....i hav made a project on TELEPHONE BILLING.....in c++ language....but i want its intoduction or the case study of dis project...plzzzzz do dis as early as possible..bcoz tomorrow i m having my 12th board computer practical........
Reply to this.
Anonymous at 09 Feb, 2010 11:49
ch1=menu(1,4,4,"1. Students Details","2. Modify Students","3. Help","4. Exit"
,""," [","]","Student Report Maker","=");

How am i to change it to print only Students details, modify students and exit?? i.e. i wanna remove 'help'..

Reply asap.
Reply to this.
Anonymous at 16 Feb, 2010 08:54
hmm...i need a c++ project on book store management...its only a base program using structures and functions...but ive been too busy with my personal problems that i didnt have time to get to it...i dont mean to say im lazy, but these personal problems took some time to heal

anyway i need it fast...thanks !
Reply to this.
Anonymous at 03 Mar, 2010 06:41
hiii
need hotel management system written in c++ very soon.......
thanx
Reply to this.
christian niebres at 12 Mar, 2010 10:31
hello good afternoon... i am christian niebres. i am a college student and i find difficulty for making programs in java programming language. can you teach me how
Reply to this.
Anonymous at 13 Mar, 2010 05:15
please help me i have a project that i suppose to pass it on monday march 15 im a first year student my project is anything that is a reservation system maybe on a hotel or airlines o maybe in a restaurant thanks
Reply to this.
Comment

Please dont enter you comments in this form - this is a fake form to confuse spamming bots. The next form is the real one.




Comment




Comment Formating : HTML tags a, strong, em, b, i, code, pre, p and br allowed. Other tags will be shown as code(< will become &lt;). Urls, Line breaks will be auto-formated.
Subscribe to Feed