Why isnt the >> working properly C++?
<pre><code>std::wifstream theFileHandle;
std::wstring theData;
theFileHandle.open( theFile.Name() );
theFileHandle &gt;&gt; theData;
theFileHandle.close();
</code></pre>

<p>Could anyone tell me why my string (theData) is only getting the first word from the file (theFile) ??? I would like the string to contain all of the text from the file including white spaces and new lines, does anyone have a suggestion for this? Thank you.</p>

<p>PS. I need the data to be preserved perfectly. Thanks.</p>
