Hello. I was doing a challenge problem from my textbook...
The problem states, "Write a function that dynamically allocates an array of integers. The function should accept an integer argument indicating the number of elements to allocate. The function should return a pointer to the array."
I have a few restrictions with this... I need to fill an array with random integers by using default_random_engine and uniform_int_distribution. Also, cannot use global variables.
I have written a code...it is very skeletal... I know it does not make sense. I have a vague idea of what to do, but I do not know how to do it exactly. Can you please help me? Please pardon my weird codes, if they bother you so much. Thanks :)