Hi.
I am, hopefully, coming towards the end of my program, just need a little bit of help with this runtime error on my program:
This appears when i run the debugger, appears when i get to the line where i call the printDetails() function:
This is my class member function for printing the room details:
The above is also what is highlighted when i click OK on the error that appears with the debugger.
Any help would be greatly appreciated!!
Thanks
Shaun B
I am, hopefully, coming towards the end of my program, just need a little bit of help with this runtime error on my program:
An access violation (Segmentation Fault) rasied in your program.
Code:
while (h_bCount != h_rooms) { hoteldetails >> h_rNumber; hoteldetails >> h_rate; getline(hoteldetails, h_facilities); //cout << h_rNumber << h_rate << h_facilities << endl; Bedroom *nwbed = new Bedroom(h_rNumber, h_rate, h_facilities); hotel.push_back(nwbed); int n; n = 0; while (n < hotel.size()) { hotel[n]->Room::printDetails(); // ERROR APPEARS ON THIS LINE n++; }
Code:
void Room::printDetails() { cout << "Bedroom: " << roomNumber << "Rate: " << rate << endl; }
Any help would be greatly appreciated!!
Thanks
Shaun B
Comment