76 964
Assignments Done
Successfully Done
In June 2019

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

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions