Name: Anonymous 2007-02-24 21:45 ID:XOqzVx8R
What is the correct way to do this? I'm doing:
data->put (x % 256);
data->put (x / 256);
and
x = data->get ();
x += data->get () * 256;
But I'm sure there's a better way. Also, this way doesn't work with negative numbers.
data->put (x % 256);
data->put (x / 256);
and
x = data->get ();
x += data->get () * 256;
But I'm sure there's a better way. Also, this way doesn't work with negative numbers.