I have a vector that store a complex structure of data.
In example :
My_vector<My_class1>
My_class1 is a vector of My_class2
Myclass2 : some ints, doubles, etc and a vector of My_class3
Myclass3 : some ints, doubles, etc
This : write(reinterpret_cast<char*>(My_vector), sizeof(My_vector));
does not run (my program crash...)
Maybe I can not access to the 'block' of memory information of My_vector ?
I dont know If I can do this ...
Any help ?
A vector itself does not hold the information. It only holds a pointer to a dynamically allocated array. Thus the nested vectors you have are not in contiguous memory.