I need quick help with the output of my code when I try and duplicate my dynamic array. I'd rather just show instead of tell and give my current code.
Here's what I want:
Enter in size of array
3
Enter number:3
Enter number:6
Enter number:7
Following array is:3 6 7
Duplicate is: 3 6 7
Here's what I get:
Enter in array size
3
Input numbers:3
following array is:3
Here's your duplicate:3
Input numbers:6
following array is:6
Here's your duplicate:6
Input numbers:7
following array is:7
Here's your duplicate:7
You forget the line of code which allocates memory, the line of code which hopefully delete the memory. The extra variables for the allocated size and the used size. And of course more lines of code for the manual memory management.
More line of codes are more failures are more death people on the road with auto cars :/