A function for convenient string concatenation with variadic templates
I don't like the idea in any way, but it is my personal opinion. The approach may bring up problems such as occasional buffer override if your buffer happens to be smaller than needed.

If you really don't want to write c_str() all the time you can wrap std::stringstream with some kind of proxy, that would have operator const char*() as a member function. The only problem is to get all the copies of member operator &lt;&lt; of the stringstream. I solved it using a template.

#include &lt;sstream&gt;
#include &lt;string&gt;

class sstream_proxy
{
    std::stringstream stream;
    std::string last;
public:
    template &lt;typename T&gt;
    sstream_proxy&amp; operator&lt;&lt;(const T&amp; value)
    {
        stream &lt;&lt; value;
        return *this;
    }

    operator const char*()
    {
        last = stream.str();
        stream.clear();
        stream.str("");
        return last.c_str();
    }
};


The buffer will have the same content unless you call converting operator again. If you want to have multiple buffers, you can have multiple instances of sstream_proxy. The code is not bulletproof, but much easier to read and understand. 

The code will be much more natural on its part.