![]() |
|
#1
|
|||
|
|||
How to create cinema seating using array?How to create cinema seat using array.if the seat is avaible it will show 0 and if the sit is not avaible it will show -1.
|
|||
|
#2
|
|||
|
|||
Re: C++ programming question.Come help...The size of the smallest standard data type is 1 byte and called type "char".
So start with an array of arrays of type char: CPP / C++ / C Code:
- assign a -1 to a particular seat to indicate it is occupied - print the value of a particular seat - print the values of all the seats! You should be able to come up with something like: Code:
CPP / C++ / C Code:
AND WE THANK YOU IN ADVANCE FOR USING THE C++ TAGS FOR YOUR CODE. Last edited by Howard_L : 14-Nov-2009 at 09:13.
|
|
#3
|
|||
|
|||
Re: C++ programming question.Come help...thx for helping...after i finish my dinner i go try the code ^^ if cant i will ask again
|
|
#4
|
|||
|
|||
Re: C++ programming question.Come help...sry to said that. i still cant get what i want.i think i better post my question and my coding at here. my question is to ask me create a Cineme TIcketing system. the cinema name is TARC screen cinema. using two dimensional array to create the seating plan.(4 x 6). row a and b cost 20 and row c and c cost 35.for seat available show 0 while for seat sold show -1 on the sit.and it also will print the ticket.ticket format should include the following seat number,price and movie name.at last it will show total of today sales.
here is my coding.i haven finish.i just finish some. CPP / C++ / C Code:
Last edited by admin : 16-Nov-2009 at 02:36.
Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
|
|
#5
|
|||
|
|||
Re: C++ programming question.Come help...Well I can see that you know how to call functions.
Personally I think a few too many. But first I must ask - This is the C++ forum; is your program supposed to be in C++? But before that I must ask - Why didn't you use the C++ code tags in your post??? Don't use any of they "system()" functions unless you absolutely need to. eg: CPP / C++ / C Code:
See how that code is in a nice looking format? That is because I enclosed it with the C++ tags. Use them next time. As I said above I think you have too many functions for what you need to do. I don't see the need for a separate function for each movie, just one function to show "movie stuff" and supply that with different data. So I would drop back to something like this: (using the apropriate language for the forum CPP / C++ / C Code:
That is what c++ is all about. (well not all, but a really neat feature) Last edited by Howard_L : 16-Nov-2009 at 00:21.
|
Recent GIDBlog
Vista ?Widgets? on Windows XP by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A few questions for someone in the programming industry. | WAEvans | Miscellaneous Programming Forum | 0 | 08-Oct-2006 09:19 |
| Looking for opinions | crystalattice | Miscellaneous Programming Forum | 6 | 27-Sep-2006 21:02 |
| printer / font color / windows programming | nicolas_qc | MS Visual C++ / MFC Forum | 0 | 03-Jan-2006 23:13 |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 15:41 |
| GUI programming | crystalattice | C++ Forum | 5 | 14-Sep-2004 12:17 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The