Sorry for the OT post, but this problem is driving me nuts! (If anyone knows of a *good* mailing list that this question would be more appropriate for, please let me know!)

The problem: I'm getting a compiler error for the following class definition:

#pragma once
#include "vector3d.h"

class point3d {
   public:
       double x, y, z;
       point3d(double, double, double);
       point3d(void);
       ~point3d(void);
       vector3d operator+ (vector3d);
       point3d operator+ (vector3d);
       vector3d operator- (point3d);
       double* operator [] (const int &);
};

The compiler doesn't like the operator overloading statements, complaining about syntax, and that it doesn't know what the vector3d identifier is. However, I've included the vector3d.h file where this type (another similar class) is defined. Am I doing something incorrectly here? Thanks!

--
Randy Barlow
Research Assistant
Department of Electrical and Computer Engineering
North Carolina State University, Raleigh, NC
[EMAIL PROTECTED]
http://www.electronsweatshop.com

--
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/

Reply via email to