@Karlos, thanks for the tips man, it's usefull for me and i'm sure it's good review for others as well. For the very few projects I do that require portability, ive hit every member in the struct and converted to network byte order and vice versa. It's a pain in the butt, especially when you have a project with a lot of different data sets. I mostly write stuff for the 8051 and use keil, which doesnt seem to do strange things with structs, but I hate my self every time I IO a struct raw....
Lately I have been messing around more with C++ on windows with MFC. I'm not a c++ guy yet but I am learning. I have seen many examples of people serializing classes to file. Especially CString classes and some of the linked list classes CList, etc. Does c++ help in serializing data in a portable manner? If i declare a class with several structs in it, will a c++ approach help make it easier to serialise to file in a portable manner?
I guess my question sounds kind of dumb, but I am wondering if doing things c++ manner can help make life easier in passing data around in files between the app compiled on different architectures. I'm not a big fan of the bloated XML libs that people bolt on to their apps. I see the usefullness of it, but XMl seems like a waste unless you need massive compatability between apps written in different languages.