http://www.justputt.com/temper-dynamic/
![]() |
| Powered by phpBay Pro |

dynamic array in C++?
3.Write a program that reads an arbitrary number of temperatures reading into the array temper using pointer. Then, again using pointers, it computes the average temperature. The program terminate when the value entered for temperature is 0.
If this was a real life problem I would say use a vector which is a pre-written dynamic array.
if you can do that then you will have to write you own. Start by makeing a dynamic array of some size
int *temper = new int [10];
then start reading in tempetures, if you need to store more then ten make a temp that is larger, copy the current arry into the temp array and either :
1) free the old array and point temper at the temp array (fastest approach)
2) free the old array, remake the old array to be large enough to hold the temp array, copy temp to the new temper. (slower, but maybe easier to understand).
Hope that helps.
![]() |
![]() True Temper Dynamic Gold S400 Shaft Set 5 PWAWSW US $99.00
|
![]() True Temper Dynamic Gold w Sensicore Iron shafts US $115.00
|
![]() TRUE TEMPER DYNAMIC GOLD LITE S400 3 PW SET NEW US $95.00
|
| Powered by phpBay Pro |


US $1,600.00


































































































