Hello,
i had some problems lately with that and posted here and got some good solutions. I am now at the end and getting a segmentationfault and i know where the error is but i don't know how to work around it.
The example code says:
I changed it to my need, but is there a way to make it like the examplecode?Code:static float x[3][3]={{0,0.5,0.7}, {0.3,0.9,0.2}, {1,1,1}}; for (i=0; i < 3; i++) { testpoints->InsertPoint(i, x[i]); };
Here is my code:
Thanks in advance!Code:void pcavis2(vector<SimpVec> vecs2) { int i; static float (*vecs2f)[3] = new float[vecs2.size()][3]; for (int j=0; j < vecs2.size(); j++){ vecs2f[j][0] = vecs2[j].coordx; vecs2f[j][1] = vecs2[j].coordy; vecs2f[j][2] = vecs2[j].coordz; }; for (i=0; i < vecs2.size(); i++) { testpoints->InsertPoint(i, vecs2f[i]); };
Jan



LinkBack URL
About LinkBacks


