I have a big amount point cloud data that I read from a file into

```
char * memblock = new char [size];

```

where size is the size of data. Then I cast my data to float numbers

```
float * file_content = reinterpret_cast<float *>(memblock);

```

Now I would like to change the data from a pointer to an array and place it in a certain structure like `std::vector<PointXYZ>`.

```
vector.clear();
for (int i = 2; i < file_content_size; i+=3) {
 vector.push_back(
    PointXYZ(file_content[i-2], file_content[i-1], file_content[i] )
    );
}

```

But I feel there must be a better way than just looping through the whole data, considering that the size of the vector is more than 1e6.