
Feb. 7, 2011
6:52 p.m.
Is there a portable way to save vector of C++ structs to a binary file, and then load it as a numpy recarray? thanks, ilya

February 2011
12:30 a.m.
On 02/08/2011 03:52 AM, Ilya Shlyakhter wrote:
Is there a portable way to save vector of C++ structs to a binary file
C++ structs are not portable, so that sounds difficult. In practice, you have compiler-specific ways to enforce some alignement within a structure, but that sounds rather nightmarish to support. Why can't you use a library with a portable file format (e.g. hdf5), or something like google protocol buffer/thrift/etc... ? Those are designed to solve your problem cheers, David
5213
Age (days ago)
5214
Last active (days ago)
1 comments
2 participants
participants (2)
-
David
-
Ilya Shlyakhter