lua-users home
lua-l archive

C++ structs?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello everyone!
Okay, I am making a Lua port of a C++ program. Don't ask me why though, if I tell you you will steal my idea. ;-) Said C++ program does what I know is a bad practice; writing structs to binary files. Well, how would I read this file in Lua? Just read each individual variable in the order that they appear on the struct definition? Back when I was attempting C++, I remember that it wrote some extra data, like 2 bytes. Do I skip 2 bytes before doing the above?
Help, please. Thanks in advance!
PS: If this is a double-post, please excuse it as I was having connection problems the first time.

AltStyle によって変換されたページ (->オリジナル) /