title: How to convert std::string to NSString?
body: <p>I am trying to convert a standard <code>std::string</code> into an <code>NSString</code> but I'm not having much luck.</p>
  <p>I can convert successfully from an <code>NSString</code> to a <code>std::string</code> with the following code</p>
  <pre><code>NSString *realm = @&quot;Hollywood&quot;;
  std::string REALM = [realm cStringUsingEncoding:[NSString defaultCStringEncoding]];
  </code></pre>
  <p>However I get a compile time error when I try the following</p>
  <pre><code>NSString *errorMessage = [NSString stringWithCString:REALM encoding:[NSString defaultCStringEncoding]];
  </code></pre>
  <p>The error I get is</p>
  <pre><code>Cannot convert 'std::string' to 'const char*' in argument passing
  </code></pre>
  <p>Am I missing something here?</p>