You should operate on it as on any other structure - fill it field by field (byte by byte) using regular memory-manipulating operations, like:
Qt Code:
struct myStruct *ptr = (myStruct*)file_memory; ptr->field1 = 1; ptr->field2 = 2;To copy to clipboard, switch view to plain text mode
For simple structures (meaning ones that consist only of primitive types) this should be enough.
Bookmarks