There is such code:

#include "wrad.h" extern class WRAD; void Func(WRAD::VisionParams parametrs); 

Inside another, the module.h file header; The definition of Func is written, and the linker does not give any errors. But when compiling, an error occurs: C2027 use of undefined type 'WRAD'. What is the catch?

    1 answer 1

    Several errors:

    1. You cannot make a forward declaration type declared inside the class.

    2. Even if it was possible, then pass by value: void Func(WRAD::VisionParams parametrs); need to know the full type

    • Suggest to make a function in the classroom? - Dark Dead Dragon