title: Declaring strings as std:string in C++
body: <p>This is based on GCC/G++ and usually on Ubuntu.</p>
  
  <p>Here's my sample program I've done:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      std::string c = "Test";
      cout &lt;&lt; c;
      return 0;
  }
  </code></pre>
  
  <p>The above code works fine.</p>
  
  <p>But I have two issues that I don't quite get...</p>
  
  <ol>
  <li><p>Writing the string declaration as <code>std:string</code> (with one <code>:</code>) also works fine. What's the difference?</p></li>
  <li><p>If I use <code>std:string</code> (with one <code>:</code>) within a class to declare a private variable, I get an error <strong>error: ‘std’ does not name a type</strong>. Example of this declaration:</p></li>
  </ol>
  
  <pre><code>class KType
  {
  private:
      std:string N;
  };
  </code></pre>
  
  <p>Can someone please explain these issues?
  Many thanks!</p>