c++ file parser slow compared to c#
<p>I need to write a file parser in c++.</p>

<p>Here's my code : </p>

<pre><code>std::string line;       
vector&lt;string&gt; slice;

while(getline(m_inputStream, line))  
{           
}
</code></pre>

<p>My file is big, so this loop takes 12 seconds.</p>

<p>My c# code is : </p>

<pre><code>StreamReader sr = new StreamReader(fileName);
string strline = "";

while (!sr.EndOfStream)
{
    strline = sr.ReadLine();
}
</code></pre>

<p>And it takes 0.6 seconds... What am I doing wrong in my C++?</p>
