I have this typeof data:
QVector<QVector3D> vector_aux;
QVector<int> indicies;
QVector<QVector3D> vector_coord;
QVector<QVector3D> vector_aux;
QVector<int> indicies;
QVector<QVector3D> vector_coord;
To copy to clipboard, switch view to plain text mode
My goal is to rearrange the vector_aux to vector_coord by the value stored in indicies.
If i store my singular data in vector_aux like this no error occured:
vector_aux << QVector3D( 0.276388, 0.850649, -0.447220)
<< QVector3D( 0.483971, 0.716565, -0.502302) .. and so on till i store 104 data.
vector_aux << QVector3D( 0.276388, 0.850649, -0.447220)
<< QVector3D( 0.483971, 0.716565, -0.502302) .. and so on till i store 104 data.
To copy to clipboard, switch view to plain text mode
The indicies.lenght() => 548
If i try do it and when i stored 500 data the program crash:
..
Ok at = 490
Ok at = 500
ASSERT failure in QVector<T>:: operator[]: "index out of range", file C:\Qt\Qt5.13.1\5.13.1\mingw73_64\include/QtCore/qvector.h, line 448
for (int i=0; i<indicies.length(); i++){
vector_coord.push_back(vector_aux[indicies[i]]);
if (i%10==0){
qDebug() << "Ok at =" << i;
}
}
for (int i=0; i<indicies.length(); i++){
vector_coord.push_back(vector_aux[indicies[i]]);
if (i%10==0){
qDebug() << "Ok at =" << i;
}
}
To copy to clipboard, switch view to plain text mode
There is a limit of 500 data that i can store, or there an other reason for my trouble?
Bookmarks