Hi folks,

I have a very simple set-up that is giving me grief. In one header
file, I have the following types defined:

    #include <vector>

    struct Point {
      int frameNum;
      float x, y, z;
    };


    typedef std::vector< Point > Frame;
    typedef std::vector< Frame > Capture;


Then, in another header, I want to use this type, but not actually
have to include the header (just for dependency simplification), so I
have

    class Capture; // forward declaration
    class Vector; // forward declaration

    bool generateCentroid( const Capture& capture, int frameNumber,
Vector& posOut );

However, I get the following error when I do so:


points.h:14: error: conflicting declaration 'typedef class
std::vector<std::vector<Point, std::allocator<Point> >,
std::allocator<std::vector<Point, std::allocator<Point> > > > Capture'
pointutils.h:7: error: 'struct Capture' has a previous declaration as
'struct Capture'

I'm not sure exactly what it is complaining about, other than it maybe
doesn't like to match my forward declaration of Capture with the
typedef of a vector of a vector, or something like that. Can anyone
spot my mistake?

Thanks.

Dave
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to