Difference between std::fstream::X and std::ios::X in C++
<p>I am new to C++. I have simple question to ask you that what is the difference between <code>std::fstream::X and std::ios::X</code> open file mode in C++ ?</p>

<p>Where  <code>x</code> can be <code>in, out, ate, trunk, ate</code> ?</p>

<p>Here is more example:</p>

<pre><code>fs.open(filename.c_str(), std::fstream::in | std::fstream::out | std::fstream::app);
</code></pre>

<p>vs</p>

<pre><code>fs.open(filename.c_str(), std::ios::in | std::ios::out | std::ios::app);
</code></pre>

<p>what is the difference between these two ?</p>

<p>Please don't answer in a complicated manner since I am beginner in C++.</p>