Can any experts let me know where i go wrong in here ?

Pages: 12
Just pasted at there
and the rest... this looks like a header file... do you have an int main(){}?

yeah. i will paste it for u now
saw it ??
char next; in string read_input() is that supposed to be set to something, because you are using it, and it's never set...

int display() doesn't return anything, should it be a void?


lol, your function actually says "data file disappear" that's actually pretty funny... hold up, I'm looking into it... I did notice that your dat files are hard-coded, and they should probably be in the same location as the executable... but I haven't looked at how it was written yet... hold up
Last edited on
read_input() is telling you that because it can't find "room.dat", "member.dat", or "booking.dat"... if you search for where the functions are being called you'll see what files it is looking for... did you copy and paste this code from somewhere or did you write it and it's getting too big for you or something?
sorry, no intention in rushing things. just wanna get your reply. haha

char next;
how should i modify it so i can relate it into the coding ?

int display()
isn't this code suppose to show the menu ??
its my assignment actually .... n yeah ... its getting out of hand... im not that well knowledge to fully do this program. Im lost, no idea how to proceed.
right now everything looks fine in the coding... that why i need professional eyes to c what i cant c. lol
I don't know what it does.. it's your code. What should it do? It was called an int but it doesn't return anything.. you can probably call it a void if nothing calling expects data back from it.

I'm not sure what char next; should be... it's using it for something though... looking at it, you need to get a char from the input and put it in next... because it's using that to set the string and find the delimiter.. but that won't solve your problem... where are the dat files? these functions are set to make them first it looks like, they want to read from them. if you don't have any, make some empty ones and see if that works...
I'm guessing this is a project you took or something and it's a little over your head. Am I getting closer?
ok i change it to
void display

how do i make an empty file ? or issit easier for me to do the opposite way that is only make it to read later ?

way over my head actually ... its a matter of do or die.
thanks for the help. appreciate it.
yeah, it seems that way... you really should learn a bit more before taking projects... you gonna give me a cut?... ;p either way

just make a file like you make a file... create an empty txt file or something and name it after the dat files... you really should try to find the ones that came with this, because there's no telling what the person that wrote it is expecting without reading everything... I'm not sure I'm in for that... well, unless you really are giving me a cut.
i think my main problem is about doing a file that can be save ?
after i made a file .dat what should i do ? how do i implement the file to the coding?
haha
what cut you would want from me ?
from what i can tell, you are going to HAVE to set next from the input stream... or you're going to have trouble since everything rides on that...
http://www.cplusplus.com/reference/iostream/istream/get/

that is the function you have to use... try and see if you can at least figure that out
Topic archived. No new replies allowed.
Pages: 12