constant integer class variable errors
The purpose of the program I am writing is to write a basic hotel, room, and customer nested class example. Currently, my logic is that I initialize an array of rooms inside of Class Hotel. The problem is, since the teacher wants our array to be of variable MAX_SIZE spaces, I have to initialize a constant integer MAX_SIZE, but it turns up all of these errors that I don't know how to fix.
The code is below. If you need me to post extra code, like the room class header, etc. (you shouldn't, as I've already eliminated all of the other errors in the code), let me know and I'll post.
Below is Hotel.h
Code:
#include "Room.h"
#pragma once
class Hotel
{
int hotelID;
// Class Room will not compile unless publically accessible.
public:
Hotel(void);
~Hotel(void);
const int MAX_SIZE = 101;
Room room[MAX_SIZE];
};
Below is Hotel.cpp
Code:
#include "Hotel.h"#include "Room.cpp"
Hotel::Hotel(void)
{
}
Hotel::~Hotel(void)
{
}