///Write a complete program that will randomly assign the values of 3 - 38 to an array of 70 integers and then print these values to the screen. A constructor must allocate memory dynamically and a destructor must free this memory at the end of the program. A separate member function will load the array. /////
Here is my code, every time i run it , the stop working window will pop up and i can't find whats wrong with it, can anyone help please.
You're also using mismatched new and delete operators. Kind of. Except that you're using new twice and delete twice, once with an array and once without, so it's all a bit of a big mess, but you're shadowing a class variable on line 25... Bleurgh. What a mess.
Look at the instructions again.
A constructor must allocate memory dynamically and a destructor must free this memory
So just do that. No allocation anywhere else, no deallocation anywhere else. Just follow the instructions.