title: C++ Why const LPSTR is different than const char *?
body: <p>Why does the following code compiles?</p>
  
  <pre><code>void foo(const LPSTR str) {
      str[0] = '\0';
  }
  </code></pre>
  
  <p>while</p>
  
  <pre><code>void foo(LPCSTR str) {
      str[0] = '\0';
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>void foo(const char* str) {
      str[0] = '\0';
  }
  </code></pre>
  
  <p>does not.</p>
  
  <p>It's actually <code>LPTSTR</code> in my code so <code>const</code> version is <code>LPCTSTR</code>...
  So can I increase code readability by having something like <code>const LPTSTR</code>, or it must be either <code>LPCTSTR</code> or <code>const TCHAR*</code>?</p>