Home > Blockchain >  editor recognizes type, but compiler does not
editor recognizes type, but compiler does not

Time:09-09

i split a class into two classes, now the editor recognizes types, but compiler does not.

CControls.h

class CControls : public QThread
{
    CControls();
}

CThreadController.h

#include "CControls.h"

class CThreadController : public QThread
{
    Q_OBJECT
    CControls *m_controls;
}

error

/home/michaeleric/Qt_Creator_Projects/GUI/CThreadController.h:22: error: ‘CControls’ does not name a type
22 |         CControls *m_controls;
  |         ^~~~~~~~~

i dont get how the editor sees CControls as a type, but compiler does not. i dont know qhat else to look at or for.

what is going on?

CodePudding user response:

i commented out //#include "CThreadController.h" from CController.h, and it got rid of error. am guessing the two can not have each other in, now to figure out how to get the two classes to talk to each other

  • Related