title: How to use string and string pointers in C++
body: <p>I am very confused about when to use string (char) and when to use string pointers (char pointers) in C++. Here are two questions I'm having.
  which one of the following two is correct?</p>
  
  <pre><code>string subString;
  subString = anotherString.sub(9);
  
  string *subString;
  subString = &amp;anotherString.sub(9);
  </code></pre>
  
  <hr>
  
  <p>which one of the following two is correct?</p>
  
  <pre><code>char doubleQuote = aString[9];
  if (doubleQuote == "\"") {...}
  
  char *doubleQuote = &amp;aString[9];
  if (doubleQuote == "\"") {...}
  </code></pre>