Apparent encapsulation
<p>The new command allocates memory in the heap to store an object.
Static allocation may cause the object to be put on the stack instead.
But they're both not protected area of memory.
I can access to this, which is just the address of the object, and then use the indirection operator, so pointing to the object fields:</p>

<pre><code>string str=string("hello");
void** str_this=(void**)&amp;str;
char* str_data= (char*)*str_this;
str_data[0]='s';
str_data[1]=0;
cout &lt;&lt;str_data; // prints "sello"
</code></pre>

<p>So is this still considered encapsulation? Is charge of the class user (who instantiates the object) to avoid poiting to it's data?</p>
