View Single Post
Old 10-25-2005, 09:48 AM   #4 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
Code:
...
double avg = 0;
while (read_record(fin,t))
{
  write_record(out,t);
  count ++ 
  avg t = (t.low + t.high)/2.0
  // output average
  cout << avg t << endl;
...
You might wanna address your variable with avg since that's what you're calling it..
So it would be:
Code:
...
double avg = 0;
while (read_record(fin,t))
{
  write_record(out,t);
  count ++ ;
  avg = (t.low + t.high)/2.0 ;
  // output average
  cout << avg << endl;
...
Next time proof read your code more, the 92 infront of the error indicates what line is is pressented on..
The easiest way is to scroll to where the first error tells you it is, see if anything there is missing/wrong, correct that and see if that eliminates the error.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote