Hello
I want to create streams of data that will include fundamental data types
but not classes or pointers. Eg I might want create a stream with a
header(2 bytes), a length of message (2 bytes), and then use the basic
structure size,data where size is the number of bytes and data is the
binary
data.
An example piece of data could be a timestamp which is a double value. So
size would be sizeof(double) followed by the data which would be the
double
value.
I can do all this at a low level but was wondering if I should really be
using the stream classes to do this? If so can anyone give me any
pointers
as to how to get started.
As I have binary data is stringstream inappropriate? If so which stream
class to use?
Angus
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]