I am trying to create a dynamic array of classes that do not have default constructors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Monster* spawn= new Monster[i];
spawn[i]=//this is where i use functions to get random stats for my constructors.
Thanks alot. I'll save this. I just finished all of the basics in the manual and haven't went into the templates and vectors section just yet.
I did get my file to run and work as good as i can tell using arrays. I will use vectors when I understand them enough. is there a problem with using this.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
spawn= new Monster*[NumMnstrsSpawned];
spawn[i]=new Monster("Talimar", "Lich", 10,100,50);//replace this constructor with functions to randomly generate figures
delete  spawn;