Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Help with a simple program (http://www.go4expert.com/forums/help-simple-program-t16170/)

Nikidinho 13Feb2009 12:11

Help with a simple program
It is in the booking system of the railways. I have to create a module that accepts the details of a passenger and checks whether the ticket has been confirmed or is in the waiting list. The module then prints the the list of confirmed passengers. Declare a class "Ticket", which consists of three member functions, "booking ()", "status ()" and "print ()" Thanks for any help!

cpulocksmith 13Feb2009 12:50

Re: Help with a simple program
well why dont you try your hand at making it and if you have a problem post the code you have and we can help you out with it ^^.

Nikidinho 13Feb2009 13:57

Re: Help with a simple program
Ohk I'll try =P

#include <iostream.h>
Class Ticket

void booking ()
cout<<"Tickets Booked"<<endl;
void status ()
void print ()
cout<<"Happy Journey";

Can any of you guys please tell me my mistakes? Thanks =P

xpi0t0s 13Feb2009 17:26

Re: Help with a simple program
That's not much of a try...
Which part are you stuck on? What don't you know how to do?
Are you hoping we'll write the program for you?

Nikidinho 13Feb2009 18:12

Re: Help with a simple program
No I'm not... I'm learning C++ from a book and this was an exercise which was given at the end of the chapter. The only example they gave was a much more simple program, so this is all I know :(

xpi0t0s 13Feb2009 19:21

Re: Help with a simple program
It may be a good idea then to shelve this project until you've worked though a lot more of the book.
Which book is it and what chapter? It seems odd they would give such a complex exercise having only shown you how to write a function header.

Nikidinho 13Feb2009 19:53

Re: Help with a simple program
Ohk thanks for your advice :happy:
It is Programming Using C++ from NIIT and it's chapter two.

All times are GMT +5.5. The time now is 14:24.