I got stuck in a programming task. I want the elements of my stl vector to be placed in a
contiguous memory to send it with MPI_Send() routine.
here is an example:
class Tem
{
//...
private:
vector<double> lenghtVector (4500);//this gives a compilation error but I need to have a fixed sized vector
};
how can I have a vector with a serial memory of should I do something else?
Thanks.
Kindest Regards.
SRec
The elements of a vector are stored contiguously according to C++ Standard (23.2.4/1). To resize it you could use appropriate constructor in the initializer list of
Temclass.: