Forward declaration incomplete type struct?

I am trying to compile the files below. The PosLin.cpp contains the SurTriAuto and SurTriPosRotAndQ functions below. Before adding SurTriPosRotAndQ, it compiled fine, but when I added SurTriPosRotAndQ, I am getting "invalid use of incomplete type ‘struct PosRotAndQ" error messages

I was thinking I could try moving SurTriAuto and SurTriPosRotAndQ to PosLin.h, but since they return "T*", I'm not sure what to do

I have a "t.h" file


1
2
3
4
5
6
7
8
9
    namespace TNS
        {
          class T
          {
          public:
            T();
            //other stuff
          }
        }




"geopar.h" file has

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
    #include "t.h"
    #include "Geo/Geo.h"

    class Geo;
    struct PosRotAndQ;

    namespace TNS
    {
       class GeoP;
       {
        public:
              GeoP();
              T* SurTriAuto(T* surface, Geo* geo, int p);
              T* SurTriPosRotAndQ(T* surface, PosRotAndQ* sur, int p);
       }
    }


and "PL.h" has

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
    #include "T/t.h"
    #include "Geo/Geo.h"

    struct PosRotAndQ {

      TNS::T* surface;
    };

    class PS{
    public: 

      PosExCode cqa(Geo* geo, POpinion* opinion, PosRotAndQ* sur)

      PosRotAndQ mattersur;
   
    }
    
    


when I add "include Pos/PL.h" to geopar.h, I get an error saying v.hpp is missing, where v.hpp is part of a 3rd-party software and it is already in my directory
Last edited on
Make sure your testcase is self-contained and actually reproduces the problem

http://www.eelis.net/iso-c++/testcase.xhtml

extra or missing colons in your class definitions
¿no header guards?
unknown "Geo/Geo.h" header
unknown types PosExCode, POpinion

> The PosLin.cpp contains the SurTriAuto and SurTriPosRotAndQ functions below.
¿you mean the file that you didn't post?
Topic archived. No new replies allowed.