22 Reputation Points
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
0 Endorsements
Ranked #107.49K
Re: [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) … |