work with .hpp files
<p>The codes in my main program are given below; here I read a file called test.dat and data of this file put in to my structure so for that I used a class called MyData (my_data.hpp).  </p>

<pre><code>int main()
{
  // cout&lt;&lt;"this my program"&lt;&lt;endl; // when this delete, this codes are not working
   bool ok=true;
   MyData  my_data("test.dat", ok);   
   if(ok==false){
      cout&lt;&lt;"Error, unable to read file1.";
      return 0;
   }
   ACalculation a_calculation(&amp;my_data);
</code></pre>

<p>For the calculation part, I used another class, AClaculation (a_calculation.hpp). Here I used pointers to speedup my program.</p>

<pre><code>ACalculation (MyData  * my_data){
MYData::iterator i;
for (i= my_data -&gt;begin(); i!= my_data -&gt;end(); i++){

if(i-&gt;A() &gt; max){
          max = i-&gt;A();
          }

}

cout&lt;&lt;”my max value is:”&lt;&lt;max;
</code></pre>

<p>My program does not show any errors but when I run it, it does not show the result of my max value. But when I added a “cout” code at the beginning of the main program then it shows the result. It means, when I delete this line:</p>

<pre><code>cout&lt;&lt;""this my program";
</code></pre>

<p>the program does not show correct output. But when I add it again, it workq. I can't understand where the error of my program is?. </p>

<p>Please help me to find out my mistakes here.. thanks</p>
