Straight into business: I have code looking roughly like this:
char* assemble(int param) { char* result = \"Foo\" << doSomething(param) << \"bar\
Well, you're using C++, so you should be using std::stringstream:
std::string assemble(int param) { std::stringstream ss; ss << "Foo" << doSomething(param) << "bar"; return ss.str(); }; // eo assemble