Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+2
Strength to Decrease Rep
-0
25% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
3
Posts with Downvotes
1
Downvoting Members
3
4 Commented Posts
0 Endorsements
Ranked #107.49K
~2K People Reached
Favorite Forums
Favorite Tags
c++ x 1
Member Avatar for WolfPack

[QUOTE=Dave Sinkula;223362]I think it is better to take the serialized approach you presented. Even with a POD structure the binary read/write is inherently non-portable. Nit - consider this: [code]s.read( r.type, sizeof [COLOR="Blue"]r.type[/COLOR] ); //s.read( r.type, 2 * sizeof(char) ); // ... s.read( (char*)&(r.size), sizeof [COLOR="Blue"]r.size[/COLOR] ); //s.read( (char*)&(r.size), sizeof(unsigned int) …

Member Avatar for Ancient Dragon
0
2K