happy returns

Hi. need help completing this. I need to write a short program which returns a report of occupied rooms and the customer in the room.

string Hotel::REPORT1()
{
Room * ptrRoom = getPtrToRoomByID(roomID);
Customer * ptrCust = getPtrToCustByID(customerID);

if((*ptrRoom).whoCheckedIn!=0)
{
return "Room is occupied\n";
}
if((*ptrCust).haveReservation!=0)
{
return "Customer is in the room\n";
}
(*ptrCust).whoCheckedIn=roomID;
(*ptrRoom).haveReservation=customerID;

totalRooms+=rooms;
count++;

totalOccupied+=occupied;
count1++;

return REPORT1();
}
Need more details on what's going on and what the problem is. What do 'count' and 'count1' represent ? Where do all these undeclared vars come from - are they member variables ? prefix them with 'm_' at least...
Topic archived. No new replies allowed.