PDA

View Full Version : C++ process help



wo1olf
September 22nd, 2009, 10:45 PM
i have to process communicating through pipe(create with pipe(fd)), i want to send a struct type instead of primitives types.My attempts to do it have failed, does anyone knows how to do it?

MTsoul
September 23rd, 2009, 12:24 AM
How has it failed? Everything is byte-level, so you have to serialize it by casting it to (void*) or (char*), and cast it back to your struct when you deserialize.