use extra memory. It's enaough content_size bytes to solve this task.
char content_[content_size];
....
task4_4::a_message::a_message( std::istream& inp )
{	
	inp.read( content_, content_size );	
	if ( inp.eof() )
		throw std::logic_error("bad input stream, a_message cannot be readed");
}
...
const std::string task4_4::a_message::str() const
{
	return "a_message("+std::string(content_, content_size)+")";
}