title: How to create a string with format specifier?
body: <p>I want to create a public api that takes a string as an argument and places this string at the loaction where I have placed a format specifer in another string in that Api.</p>
  
  <pre><code>e.g. string PrintMyMessage( const string&amp; currentValAsString)
       {
            string s1("Current value is %s",currentValAsString);
            return s1;
       }
  </code></pre>
  
  <p>Currently I am getting following build Error.</p>
  
  <pre><code>1&gt;d:\extra\creatingstrwithspecifier\creatingstrwithspecifier\main.cxx(8): error C2664: 'std::basic_string&lt;_Elem,_Traits,_Ax&gt;::basic_string(const std::basic_string&lt;_Elem,_Traits,_Ax&gt; &amp;,unsigned int,unsigned int)' : cannot convert parameter 2 from 'const std::string' to 'unsigned int'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;,
  1&gt;              _Ax=std::allocator&lt;char&gt;
  1&gt;          ]
  1&gt;          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
  </code></pre>
  
  <p>I just want to know what could be a better way to accomplish this task.</p>