Is there a C (not C++, Boost etc.) library for providing cross platform datatypes ?
To elaborate, I want to store an int in a file in a 32-bit linux machine, read the file and the same int from a 64-bit windows machine. Is this possible ?
Update: I do not want to use sqlite or some kind of database either. I want a library which can help me in using the data types throughout my code.
If all you want to do is store 32 bits signed integers, just decide on a format, for example big endian. You can then write the serialisation/deserialisation yourself:
If you need a variety of types, use a library like tpl, Eet, Avro, protobuf-c or an implementation of a standard like XDR, JSON, or ASN.1. If you have large numerical data sets use something like HDF or NetCDF.