I'm trying to pass a class reference to a field, but I get the error "'mazeGenerator::maze' references must be initialized".
I tried initializing 'maze' above the class constructor.
Why is this happening?
class mazeGenerator {
public:
Maze& maze;
mazeGenerator(Maze& mazeObj) {
maze=mazeObj;
}
}