C++ String pointers
<p>In my previous app I had an object like this:</p>

<pre><code>class myType
{
public:
 int a;
 string b;
}
</code></pre>

<p>It had a lot of instances scattered everywhere and passed around to nearly every function.</p>

<p><strong>The app was slow. Profiling said that 95% of time is eaten by the string allocator function.</strong></p>

<p>I know how to work with the object above, but not how to work with string pointers.</p>

<pre><code>class myType
{
public:
 int a;
 string* b;
}
</code></pre>

<p>They told me to use pointers as above.</p>

<ul>
<li>How much faster is it with a string pointer?</li>
<li><p>What is copied when I copy the object?</p></li>
<li><p>How to the following using the class with the pointer:</p></li>
</ul>

<p>Access the string value</p>

<p>Modify the string value without modifying the one in the object (copy?)</p>

<p>General things that change if I use string pointers?</p>
