Error C1010 Trying to compile

From: Carol Geddes (cgeddes_at_shaw.ca)
Date: 12/23/03


Date: Tue, 23 Dec 2003 17:35:10 GMT

I have copied this from a tutorial. When I try to compile it I get the
following error.
fatal error C1010: unexpected end of file while looking for precompiled
header directive.
I am using Microsoft Visual C++ 6.0
I can't go on with Classes if I can't even compile this simple class.
Thanks for any help. Carol

// classes example
#include <iostream.h>

class CRectangle {
    int x, y;
  public:
    void set_values (int,int);
    int area (void) {return (x*y);}
};

void CRectangle::set_values (int a, int b) {
  x = a;
  y = b;
}

int main () {
  CRectangle rect;
  rect.set_values (3,4);
  cout << "area: " << rect.area();
}



Relevant Pages