Suppose I have a dynamic array.(trees) The user enters the number of times for the dynamic array to loop based on int num.
He has filled the array, say num=3, so he has entered the age of 3 trees into trees.
Now he wants to display the age of all three trees, in a format a bit like this...
tree 1 is 15
tree 2 is 101
tree 3 is 3
How would this be done?
When outputting, I have created a For loop that loops based on num, and cout<<trees" /n";, yet all I get is would be a single cout statement of the last data that was input. How can I solve this?