Can you point out where I have 2 choice? I only see one. Thanks.
Type: Posts; User: zenghoong
Can you point out where I have 2 choice? I only see one. Thanks.
How bout if I change it to this
#include<stdio.h>
void menu(void);
int choice, choice2;
main()
I don't know why, the moment I enter a value, the debugging is terminated. Someone please shed some light.
#include<stdio.h>
void menu(void);
int choice;
main()
{
menu();
Okay. It works. THANKS A MILLION RockyMarrone!
My code works if I enter numbers. Yours does too. But when I enter an alphabet, it keeps repeating "Do you want another ticket". Tried it with yours. When I enter an alphabet, the same thing happens....
do you mind going to my other thread. Need help with that question.
I've managed to redo the logic and here is what I got
#include<stdio.h>
char tix;
void anotick(void);
main()
{
Thats fine but one more problem. it only allows buying one ticket. After that, they keep asking if I want another ticket. But they never ask for the personal details anymore.
#include<stdio.h>
int tix=0;
main()
{
do
{
printf("\nDo you want to reserve another ticket?[1.YES 2.NO]\n");
scanf("%d", &tix);
The first is for the flight, second for row, third for column
Here's my code:
#include<stdio.h>
int tix=0;
main()
{
do
And erm, it only allows buying one ticket. After that, they keep asking if I want another ticket. But they never ask for the personal details anymore.
Thanks but do you mind telling me where you've made changes?
i've changed it all to customer now. But still no luck.
Done. But now, it says:
1>c:\users\user\desktop\pspd\ppspd6\ppspd6\pspd66.c(226) : error C2224: left of '.desg' must have struct/union type...
Its funny because after I added the * to everything, like this:
*code removed*
It says
1>c:\users\user\desktop\pspd\ppspd6\ppspd6\pspd66.c(225) : error C2059: syntax error : '*'...
After adding the * to the structure like this:
struct custinfo
{
char* desg;
char* fname;
char* lname;
char* icnum;
int seat;
do you suggest I use short instead of char?
And, i tried removing this line
int customer[2][4][5] = {0};
but nothing seems to have changed
It was. except it will display an error when it reaches the purchasing page.
I'm creating an airline reservation for my assignment and the menu is working fine. The two problems I'm currently facing are:
1. After you choose LK and choose Business, the program displays the...
Thanks a million Adak!
I wrote this code for my airline reservation system. Now I can't run it because of a Linking error.
It says:
1>airlinne1.obj : error LNK2019: unresolved external symbol _printticket referenced...
I would tell you guys upfront that this is for my assignment. But, all I wanna ask is, how do you make the program go to a certain part of the codes and run from there.
Here, I want allow the...