int a = 10;
char str[] = "This string";
float money = 0.1;
char * buf = new char [1024];
buf << a << str << money;
// .....
delete [] buf;
typedef staruct {
int a = 10;
char str[256];
float money = 0.1;
}HZ;
HZ hz;
char * buf = (char *)malloc(1024);
memcpy(buf, &hz, sizeof(HZ))
#include <stringstream>
std::stringstream sout;
sout << "some string " << 42;
cout << sout.str();