I admit I got distracted from the original question. Regarding a name containing spaces, you would use
getline()
http://www.cplusplus.com/reference/string/string/getline/
That's simple enough used on its own, but does mean a bit of thought when mixed with other input statements. Perhaps you should leave that for now, and consider it later if needed.
Looking at the code, I got a bit lost in trying to understand some of it. The variable
z
and the vector
input
were things for which I didn't know the purpose. Use of meaningful names helps a lot in making a program easy to read and understand. Similarly, names like obj and obj2 don't convey anything meaningful to the reader, though I did figure those out.
Also, in the struct
customer
, member variable
ic
is declared as a string, but elsewhere it seems to be treated as an integer. Also string
checkindate
seems to be ignored in much of the code.
What I suggest is to focus on options 1 and 4 first of all. (personally I wouldn't have written any of the remaining sections until those were fully working and tested).
As I said, i got distracted by various other issues, but it looks like there must be a path through the execution of the code where
float roomfees
may be displayed without having a value previously assigned.