+ 6
Help me to fix the syntax error
How can I fix the syntax error in the function show reservation https://code.sololearn.com/cQI2d4m22118/?ref=app
37 Respuestas
+ 11
At least post your code
+ 4
+ 2
input seat no 12 out put 1-32 seats are empty
+ 2
user input didn't accept on reservation
+ 2
I think i my mistake is the syntax can i help me
+ 2
Fixed the code just have a look.
1. reservation row, col convertion.
2. insert getline removed.
3. show removed the if check.
https://code.sololearn.com/cItj4iNcpI7X/?ref=app
+ 1
Those who are master in c++ language pls help me
+ 1
I think i have a problem with my syntax
+ 1
Hope u can help me on the reservation
+ 1
anyone?
+ 1
Can you Show us example for input and expected output?
+ 1
Anyone who is master in c++ language?? Can u help me on my syntax
+ 1
The reservation Has a problem on the syntax
+ 1
when u run that program there is a syntax error in the function of show reservation
+ 1
check this normally in c standard the string compare strcmp will be taking chat * pointer;
strcmp (const char* str1, const char* str2);
In the above program I have observed
If (strcmp(bus[n].busn, number) ==0)
In this line bus[n].busn which is string and number is a array of char.
Change the above peace of code with
if (strcmp(bus[n].busn.c_str(), number) ==0)
+ 1
DeWill hope u help me
+ 1
User 0110 yes it's workinh but it has an syntax error in the show reservation.
+ 1
I run the code, it show no error.
I noticed that you created a function that you called empty, in order to make the bus seats Empty, but when user choose the install function multiple times, the function empty() works only on the first bus , while the rest of the buses when calling the install function again will always be not empty(cout --> akways seats not emty).
If it was intentional, there is nothing wrong. As for if it was not intentional, then you should move the call of emty() function to line 178 after 'w' input inside the while loop, thats will make evry seat buses emty after call istalation() function sevral time.
0
Welcome, Lealyn. 🙂
This forum is meant for specific programming-related questions.
Do you have a specific code of your own you need help with right now?
Then please ask, and link your code here.
https://www.sololearn.com/discuss/1316935/?ref=app