Friday, October 10, 2014

Consider the following attempt to allocate a 10-element array of pointers to doubles and...

Consider the following attempt to allocate a 10-element array of pointers to doubles
and initialize the associated double values to 0.0.
Rewrite the following (incorrect) code to do this correctly. (Hint: Storage for the
doubles needs to be allocated.)
double* dp[10];
for (int i = 0; i
dp[i] = 0.0;

No comments:

Post a Comment