<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'a little help in C++' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'a little help in C++' posted on the 'Beginner C/C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2008 Programmers Heaven</copyright>
    <pubDate>Thu, 24 Jul 2008 05:02:17 -0700</pubDate>
    <lastBuildDate>Thu, 24 Jul 2008 05:02:17 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>a little help in C++</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/370611/370611/ReadMessage.aspx</link>
      <description>#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
#include &amp;lt;conio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;process.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream.h&amp;gt;&lt;br /&gt;
#include &amp;lt;iomanip.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
 {&lt;br /&gt;
 clrscr();&lt;br /&gt;
 ifstream salary;&lt;br /&gt;
 ofstream outfile;&lt;br /&gt;
&lt;br /&gt;
double emp_salary;&lt;br /&gt;
double emp_tax;&lt;br /&gt;
double emp_sss;&lt;br /&gt;
double tot_salary=0;&lt;br /&gt;
double tot_tax=0;&lt;br /&gt;
double tot_sss=0;&lt;br /&gt;
int lctr=0;&lt;br /&gt;
&lt;br /&gt;
salary.open("SALARY2.FLE");&lt;br /&gt;
if(salary.fail())&lt;br /&gt;
 {&lt;br /&gt;
  cout &amp;lt;&amp;lt; "Open File Error";&lt;br /&gt;
  exit(1);&lt;br /&gt;
 }&lt;br /&gt;
else&lt;br /&gt;
 {&lt;br /&gt;
  cout &amp;lt;&amp;lt; "Open File Ok";&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
outfile.open("salary2.out");&lt;br /&gt;
if(outfile.fail())&lt;br /&gt;
 {&lt;br /&gt;
  cout &amp;lt;&amp;lt; "Open File Error &amp;gt;&amp;gt;&amp;gt; salary2.out";&lt;br /&gt;
  exit(1);&lt;br /&gt;
 }&lt;br /&gt;
else&lt;br /&gt;
 {&lt;br /&gt;
  cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
  cout &amp;lt;&amp;lt; "Open File Ok";&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
getch();&lt;br /&gt;
&lt;br /&gt;
outfile &amp;lt;&amp;lt; " \t\tSalary Report" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;br /&gt;
outfile &amp;lt;&amp;lt; "             SALARY AMOUNT" &amp;lt;&amp;lt; "\t        TAX AMOUNT" &amp;lt;&amp;lt;" \t      SSS"&amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;br /&gt;
&lt;br /&gt;
outfile.setf(ios::fixed);&lt;br /&gt;
outfile.setf(ios::showpoint);&lt;br /&gt;
outfile.precision(2);&lt;br /&gt;
&lt;br /&gt;
salary &amp;gt;&amp;gt; emp_salary;&lt;br /&gt;
while(!(salary.eof()))&lt;br /&gt;
 {&lt;br /&gt;
&lt;br /&gt;
  lctr ++;&lt;br /&gt;
  if (emp_salary &amp;gt; 20000)&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
  emp_tax = emp_salary * .10;&lt;br /&gt;
  emp_sss = emp_salary * .01;&lt;br /&gt;
  }&lt;br /&gt;
  else if(emp_salary &amp;gt;= 10000)&lt;br /&gt;
  {&lt;br /&gt;
  emp_tax = emp_salary * .09;&lt;br /&gt;
  emp_sss = emp_salary * .01;&lt;br /&gt;
   }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
  emp_tax = emp_salary * .08;&lt;br /&gt;
  emp_sss = emp_salary * .01;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  outfile &amp;lt;&amp;lt; setw(9) &amp;lt;&amp;lt; lctr &amp;lt;&amp;lt; ". " &amp;lt;&amp;lt; setw(15) &amp;lt;&amp;lt; emp_salary &amp;lt;&amp;lt; "         " &amp;lt;&amp;lt; setw(9) &amp;lt;&amp;lt; setw(15) &amp;lt;&amp;lt; emp_tax &amp;lt;&amp;lt;setw(9) &amp;lt;&amp;lt;setw(15)&amp;lt;&amp;lt; emp_sss&amp;lt;&amp;lt;endl;&lt;br /&gt;
  tot_salary += emp_salary;&lt;br /&gt;
  tot_tax += emp_tax;&lt;br /&gt;
  tot_sss += emp_sss;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  salary &amp;gt;&amp;gt; emp_salary;&lt;br /&gt;
  }&lt;br /&gt;
outfile &amp;lt;&amp;lt;endl;&lt;br /&gt;
outfile &amp;lt;&amp;lt; endl;&lt;br /&gt;
outfile &amp;lt;&amp;lt;"                 "&amp;lt;&amp;lt; tot_salary&amp;lt;&amp;lt;"                "&amp;lt;&amp;lt; tot_tax&amp;lt;&amp;lt; "        " &amp;lt;&amp;lt;tot_sss&amp;lt;&amp;lt;endl;&lt;br /&gt;
outfile &amp;lt;&amp;lt;endl;&lt;br /&gt;
outfile &amp;lt;&amp;lt;"       "&amp;lt;&amp;lt; "TOTAL EMPLOYEES:"&amp;lt;&amp;lt;lctr&amp;lt;&amp;lt;endl;&lt;br /&gt;
salary.close();&lt;br /&gt;
outfile.close();&lt;br /&gt;
getch();&lt;br /&gt;
return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all i want to know is when you read a file there a second page &lt;br /&gt;
&lt;br /&gt;
example&lt;br /&gt;
&lt;br /&gt;
first page&lt;br /&gt;
          salary amount        tax amount      sss&lt;br /&gt;
1           10000                 1000         1212&lt;br /&gt;
.           12000                 1200         1212&lt;br /&gt;
.           13000                 1212         1212&lt;br /&gt;
.           12121                 1212         1212&lt;br /&gt;
.           12121                 1312         1212&lt;br /&gt;
60          12121                 3121         1212&lt;br /&gt;
&lt;br /&gt;
second page:&lt;br /&gt;
             salary amount         tax amount        sss&lt;br /&gt;
&lt;br /&gt;
61            23423                 2323            1212&lt;br /&gt;
.             12121                 1212            1212&lt;br /&gt;
.             12121                 1212            1212&lt;br /&gt;
.             12121                 1212            1211&lt;br /&gt;
.             12121                 1212            1212&lt;br /&gt;
100           12121                 1212            1212&lt;br /&gt;
       &lt;br /&gt;
total salary: 121212     total tax: 1212 total sss: 1212    &lt;br /&gt;
       &lt;br /&gt;
total employee:100&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all i what to know guys is what is the code for 2 page of the program like the example above thanks guys&lt;br /&gt;</description>
      <pubDate>Wed, 26 Mar 2008 07:55:35 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: a little help in C++</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/370611/370625/ReadMessage.aspx#370625</link>
      <description>erm... This is not valid C++...Its more like C with classes..without the classes *shrugs*.&lt;br /&gt;
&lt;br /&gt;
In any case I am not quite sure what you are asking; can you please elaborate and edit your post using proper code tags?&lt;br /&gt;
&lt;hr /&gt;&lt;span style="font-size: xx-small;"&gt;&amp;#91;.:EvolutionEngine&amp;#93;&amp;#91;.:MicroOS Operating System&amp;#93;&amp;#91;&lt;a href="http://www.brokenthorn.com"&gt;Website :: OS Development Series&amp;#93;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;</description>
      <pubDate>Wed, 26 Mar 2008 14:06:16 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
    <item>
      <title>Re: a little help in C++</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/370611/370636/ReadMessage.aspx#370636</link>
      <description>: erm... This is not valid C++...Its more like C with classes..without &lt;br /&gt;
: the classes *shrugs*.&lt;br /&gt;
: &lt;br /&gt;
: In any case I am not quite sure what you are asking; can you please &lt;br /&gt;
: elaborate and edit your post using proper code tags?&lt;br /&gt;
: &lt;hr /&gt;&lt;span style="font-size: xx-small;"&gt;&amp;#91;.:EvolutionEngine&amp;#93;&amp;#91;.:MicroOS &lt;br /&gt;
: Operating &lt;br /&gt;
: System&amp;#93;&amp;#91;&lt;a href="http://www.brokenthorn.com"&gt;Website :: &lt;br /&gt;
: OS Development Series&amp;#93;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
: &lt;br /&gt;
my problem is when the code reads a file there should be 2 page when the code read a file the maximum is 60 item per page&lt;br /&gt;</description>
      <pubDate>Wed, 26 Mar 2008 19:25:13 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
  </channel>
</rss>