title: Win32 programming TextOut WM_Paint
body: <p>Having some trouble in this block of code at the TextOut line it says:</p>
  
  <pre><code>error: cannot convert 'std::string* {aka std::basic_string&lt;char&gt;*}' to 
  'LPCSTR {aka const char*}' for argument 4 to 
  'BOOL TextOutA(HDC, int, int, LPCSTR, int)'
  </code></pre>
  
  <p>I've searched for a while and wasn't able to find anything that didn't either eternally confuse me or would accomplish what I want to do which is draw a string.</p>
  
  <pre><code>case WM_PAINT:
          {
              HDC hdc;
              PAINTSTRUCT ps;
              string text = "Something";
  
              RECT rect;
              GetClientRect( hwnd, &amp;rect );
              hdc = BeginPaint( hwnd, &amp;ps );
  
              TextOut( hdc, rect.right/2, rect.bottom/2, &amp;text, 1 );
  
              EndPaint( hwnd, &amp;ps );
          }
          return 0;
          break;
  </code></pre>