C++ input in string or char[]?
<p>I've had recently a question to ask that's been bothering me for days. Has the string type some type of memory management already or what, because I'm able to do such a thing</p>

<pre><code>string a;
cin &gt;&gt; a;
</code></pre>

<p>Without knowing how long is a going to be. Why would some people(some from youtube tutorials) use char array(C style) and then take care of the indexing when they could just do it simpler with string types?</p>

<p>Thanks!</p>