63 151
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #9080 in C++ for M. Javed Iqbal

Question #9080
how we can use dynamically allocated two-D array in tokenization
Expert's answer
1)Initialize at the beginning:
double **queryPoint = 0;
int qp_count = 0;
2)For every line call:
// call realloc to make the space for points larger by one element
queryPoint = realloc(queryPoint, sizeof(double*)*(qp_count+1));
// allocate space for the new point
queryPoint[qp_count] = malloc(sizeof(double)*2);
// increase the point count
qp_count++;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions