title: Char array gives error when initializing
body: <p>It can be simple but I m new about c++<br>
  In char arrays we can let the compiler to count number of characters in the string like</p>
  
  <pre><code>char myarray[]="stringvar";
  </code></pre>
  
  <p>its ok, but if i change the code as below,the compiler gives error</p>
  
  <pre><code>string myvar = "stringvar";
  char myarray[] =myvar;
  
  error: initializer fails to determine size of myarray
  </code></pre>
  
  <p><br>
  Why is that?</p>