I'd use a stringstream to build the string. Something like:
std::vector::const_iterator it;
std::stringstream s;
for( it = vec.begin(); it != vec.end(); ++it )
{
if( it != vec.begin() )
s << " ";
s << *it;
}
// Now use s.str().c_str() to get the null-terminated char pointer.