How do I output specific characters from a txt file to specific points?
<p>First task of the tutorial and I'm already stumped,</p>

<p>Right, I'm supposed to write down 3 numbers into a text file, open that file up, output all 3 numbers and the average. Managed to get the first 2 parts done but I've hit a wall at the actual output part.</p>

<p>Here is the contents of the text file exactly as it appears within the file:</p>

<blockquote>
  <p>25</p>
  
  <p>10</p>
  
  <p>12</p>
</blockquote>

<p>And here is the code I have so far:</p>

<pre><code>#include &lt;fstream&gt;
#include &lt;iostream&gt;
#include &lt;iomanip&gt;
#include &lt;string&gt;

using namespace std;

int main()
{

// Create an ifstream input stream for reading of data from the file
ifstream inFile;
inFile.open("ProgrammingIsFun.txt");

// Create an ofstream output stream for writing data to a file
ofstream outFile;
outFile.open("Results.out");



cout &lt;&lt; "The first integer is " &lt;&lt; endl;
cout &lt;&lt; "The second integer is " &lt;&lt; endl;
cout &lt;&lt; "The third integer is " &lt;&lt; endl;
cout &lt;&lt; "The average is " &lt;&lt; endl;

// Close the files since we're done with them
outFile.close();
inFile.close();

system("Pause");
return 0;
}
</code></pre>

<p>From what I understand the contents of the txt file can only contain those 3 numbers and nothing else (I could be wrong though)</p>

<p>Any help would be much appreciated.</p>
