Mail Archives: djgpp/1998/08/03/00:00:36
I didn't try this at home but doesn't loc[] (and all this other
stuff) default to private? Before breaking down (graphics algorithms
are great for OO programming), try to public loc[] (although in
general it's best to protect your data), or access loc[] indirectly
though a get() type method.
-Chester
zappaz AT ihug DOT co DOT uk wrote:
>...
> // and a plane class defined by three Point3d's :
>
> class plane {
>...
> class Point3d *loc[4]; //loc[0] unused
>...
> public:
> void operator = (class plane *);
>...
> };
>
> Now the following code using these classes gives me a floating point
> exception:
>...
You don't show the scope of the calling
mechanism, but it looks like loc[] really isn't defined there.
> double temp = (double) loc[1]->getX(); //this line causes an
> exception,
> printf("%f\n", loc[1]->getX() ); // but this line is fine - ???
>
>...
> ChrisC
onflicting types for `_osminor'
c:/djgpp/include/stdlib.h:167: previous declaration of `_osminor'
In file included from allegro.h:56,
from src/allegro.c:36:
c:/djgpp/include/errno.h:58: conflicting types for `sys_errlist'
c:/djgpp/include/stdlib.h:161: previous declaration of `sys_errlist'
make.exe: *** [obj/djgpp/allegro.o] Error 1
- Raw text -