Hi, I am working on a project for school, and I have run into a problem. I am trying to create a dynamically allocated array of Class objects, which is determined through file reading, and I can't get it to work.
The Boss and Enemy classes inherit from the Location class.
Also, in this particular class file, my compiler is underlining = and << . I used #include <iostream> and usingnamespace std; so there must be some other problem.
If you can fix any errors I would really appreciate it. Thanks.
header file
Thanks a lot for the help, it fixed most of my problems. I just have one last question. In this function, I have allocated the space for the 2d array and defined each pointer, but I want to go through the array and change what default object some of the pointers are pointing at based on information from a text file. I am trying to convert a Location pointer to a Enemy, Boss, or Riddles pointer (Enemy, Boss, and Riddle inherit from Location)