I have a string
Char * g = " 1.5 3.4 4.5, 2.3 4.5 6.7 , 3.3 5.5 7.8"
these are the X1 Y1 Z1, X2 Y2 Z2,.....Xn Yn Zn values of a geometry
1, I want to calculate the Number of points in the string
for example here the number of points are 9 (nine)
2, I have to allocate a 2D array points [number of points] [3] ( If i know the Number of points I will allocate the array)
/* it is important*/
3 How can I retrieve the float values from the string and store the X1 Y1 Z1 values in the 2D array......
I have used strtoken function in c++ but it showed some errors...
any help would be appreciated..........
Start Free Trial