How to fread into a vector inside a class?
<pre><code>class WavFile
{
    std::vector&lt;short&gt; SoundData;

public:

    std::vector&lt;short&gt; getSoundData()
    {
        return SoundData;
    }
}
</code></pre>

<p>Normally I'd use <code>fread( &amp;SoundData[0], 1, 1337, SomeFile );</code></p>

<p>But now that I'm using a vector inside a class, I'm having trouble with the following:</p>

<ul>
<li><p>Knowing how to set the vector size outside the class.</p></li>
<li><p>And I'm not sure how to use the method as an argument for <code>fread</code> to put the data inside the vector.</p></li>
</ul>
