In the wonderful world of C# i can create a memory stream without specifying its size, write into it and then just take the underlying buffer.
How can i do the same in c++? basicly i need to do:
memory_stream ms(GROW_AS_MUCH_AS_YOU_LIKE);
ms << someLargeObjects << someSmallObjects << someObjectsWhosSizeIDontKnow;
unsigned char* buffer = ms.GetBuffer();
int bufferSize = ms.GetBufferSize();
rawNetworkSocket.Send(buffer, bufferSize);
By the way I have boost in my project though I'm not all that familiar with it.
Thank you.