I've got two files... sdl.h and ray.h.
Two classes, Vector3 and Point3 (+ a bunch more..) are defined in sdl.h.
One class, Ray is defined in ray.h. above the definition i put two forward declarations for the classes defined elsewhere that Ray uses.
Also, sdl.h contains other class definitions that instantiate a 'Ray', but have been commented out for now.
I see the following error:Code:#include "sdl.h" class Vector3; class Point3; class Ray { public: //Ray(); Point3 start; Vector3 dir; //void setStart(Point3& p) {start.x=p.x; start.y=p.y; start.z=p.z;}; //void setDir(Vector3& v) {dir.x=v.x ; dir.y=v.y ; dir.z=v.z;}; //other fields and methods.... };
ray.h:20: error: field `start' has incomplete type
ray.h:21: error: field `dir' has incomplete type
Can someone explain what this error is and how to solve the problem?