Structs in C (22)

13 Name: #!/usr/bin/anonymous : 2008-08-20 00:39 ID:Heaven

I'm >>5 and >>7.
Everyone is clueless. When you write object X you are guaranteed to read back object X from a file stream in C and C++ (IO errors can happend, but they are not relevant)

The isssues addressed by >>12 are not even relevant! You've all missed the point!

Are there really that few people that know C or C++ well here?

>>8
fread takes 2 integers, size of individual member and number of members.
That way it can handle 'different word lengths'. (or any object length actually)

As for endianness, it's not even mentioned in the C standard (nor in the C++ standard)
What C (and C++) guarantees is about a particular implementation writing and reading back representations.

Get it? (btw, your program and protocol can guarantee such things easily, it's not up to the standard of the language to define such things, that would limit portability by a lot)

This thread has been closed. You cannot post in this thread any longer.