title: Safely concatenate c-strings in class constructor
body: <p>I have a class that needs to concatenate two <code>const char*</code> strings during construction, and even use the result (concatenated string) later on in the initialization list.</p>
  
  <pre><code>const char* SUFFIX = "suffix";
  
  class widget {
  public:
      widget(const char* prefix) : key(???), cls(key) { };
  
  private:
      const char* key;
      const important_class cls;
  }
  
  widget("prefix_"); // key should be prefix_suffix
  </code></pre>
  
  <p>There is a global (in <code>widget</code>'s cpp) <code>const char*</code> suffix that I want to append to user supplied prefix.</p>
  
  <p>How to do it?</p>
  
  <hr>
  
  <p><strong>BTW.</strong> I've heard about <code>string</code>. If I could use <code>string</code> I wouldn't ask here, about <code>const char*</code></p>