Original Post
Ok im new to network programming so im playing around with it, im designing a little class which creates a stream of bytes so i can send it over the network. I dont have a problem putting data into bytes, its just getting it from the stream back into usable data, heres my current structure: CBuffer buffer; int a,b = 0; float i = 0; char * str = "My String"; buffer.Write(a); buffer.Write(b); buffer.Write(i); buffer.Write(str, strlen(str)); //now the idea is you can read from it in the same way, int a; float b; a = buffer.Read(integer); b = buffer.Read(float); etc etc But i cant think of the best way to get char *, or std::vector str; back into variables. Cheers. Ash.