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

  • Re: query remaining Stack Size
    ... int main ... teb.exe: fatal error LNK1120: 1 unresolved externals ... the line to get a compile error). ...
    (microsoft.public.win32.programmer.kernel)
  • Re: GCC difference in size of long int on Suse SLES9 / Suse Professional 10.0
    ... The kernel uses printf() with 'long int', ... I can't compile 'on-the-fly'. ... clashing with the hardware and any libs that you interact with. ... platform types build up their own int types. ...
    (comp.os.linux.development.apps)
  • Re: Im a C++ programmer, and Relfs X.CPP is good.
    ... >> and it doesn't compile either. ... home.cpp:93: implicit declaration of function `int fclose' ... You cannot change to your home directory through an external ...
    (comp.lang.lisp)
  • Re: Im a C++ programmer, and Relfs X.CPP is good.
    ... >> and it doesn't compile either. ... home.cpp:93: implicit declaration of function `int fclose' ... You cannot change to your home directory through an external ...
    (comp.unix.programmer)
  • Re: new order doubt
    ... Warning test2.c: 8 no type specified. ... Defaulting to int ... Tests probably come in several different types: this should compile ... Even Microsoft has problems with this obscure rules. ...
    (comp.lang.c)