istream vs memory mapping a file?
<p>I am trying to map a file to memory and then parse line by line- is istream what I should be using? </p>

<p>Is istream the same as mapping a file to memory on windows? I have had difficulties trying to find a complete example of mapping a file into memory.</p>

<p>I have seen people link memory mapping articles from msdn, but if anybody could recommend a small (~15 line?) example I would be most welcome.</p>

<p>I must be searching the wrong thing, but when searching "c++ memory mapping example" on google I could not find an example that included iterating through. </p>

<p>These were the closest results (just so people realise I have looked): <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2044.html#ClassSharedMemoryObjectExample" rel="nofollow">http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2044.html#ClassSharedMemoryObjectExample</a></p>

<p><a href="http://msdn.microsoft.com/en-us/library/dd997372.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd997372.aspx</a> (no C++ code)</p>

<p><a href="http://beej.us/guide/bgipc/output/html/multipage/mmap.html" rel="nofollow">http://beej.us/guide/bgipc/output/html/multipage/mmap.html</a> (was for Unix I believe, not windows)</p>
