Skip to main content
2 of 2
deleted 11 characters in body
Mikael Patel
  • 8k
  • 2
  • 16
  • 21

The compiler error is due to that the compiler does not know what Thread is.

tcan.h:6:28: error: expected class-name before '{' token class tcan : public Thread {

The issue is that the header file is not complete. A good practice is to include all header files that are needed to read the header file. As Thread is defined in mthread.h the tcan.h file should be:

#ifndef tcan_h
#define tcan_h

#include <mthread.h>

class tcan : public Thread {
public: tcan();
protected: bool loop();
private:
};
#endif

Cheers!

Mikael Patel
  • 8k
  • 2
  • 16
  • 21