![]() |
|
#1
|
|||
|
|||
C++ coding problemI'm trying to create a program that is like a airplane seating chart which lists the seats available for reservation and tells the user to choose a seat to reserve. After the user choose a seat, it is suppose to update the chart and place an X on the seats that are now unavailable. I am having trouble creating the code for the update section. Here is what i have so far:
CPP / C++ / C Code:
Any help would be appreciated. Thanks in advance. Last edited by dsmith : 16-Aug-2004 at 13:31.
Reason: Please use [c] & [/c] for syntax highlighting
|
|||
|
#2
|
||||
|
||||
|
Hello Casarik. How about something that makes use of the ASCII values of the characters entered?
CPP / C++ / C Code:
That does absolutely no bounds checking though. HTH, d __________________
The best damn Sports Blog period. |
|
#3
|
||||
|
||||
|
first off your getchoice function isn't going to work
you have choice[2] declared and then you try to store a value into simply choice. You need to declare which spot your going to assign the value to (either choice[0] or choice[1]). Next the user is gonna enter thier choice as something along the lines of 1A which, and I'm not sure about this (someone can either back me up or correct me) means your gonna have to store the 1 in an int variable and then type cast it to a char. now once you get that fixed I would just have updatechart() simply put an X in the chart[][] array.Something like: CPP / C++ / C Code:
__________________
"To argue with a person who has renounced the use of reason is like administering medicine to the dead." -Thomas Paine www.sullivan-county.com/deism.htm |
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mpeg2 SVCD disc problem | mrnobody | Computer Software Forum - Windows | 0 | 13-Aug-2004 08:51 |
| C I/O problem | kelly80 | C Programming Language | 4 | 27-Apr-2004 20:15 |
| Another FX 5600 problem (but with details that might shed light on this) | BobDaDuck | Computer Hardware Forum | 2 | 16-Apr-2004 07:53 |
| Pls help in this coding. | harsha | C++ Forum | 5 | 08-Apr-2004 20:48 |
| RE: A simple update and } problem | Dagma20 | MySQL / PHP Forum | 3 | 27-Mar-2004 16:37 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The