Reason: the compiler doesn’t know the concrete implementation of struct or class,
Analysis: it usually occurs in the following situations: suppose we have a class some defined in some. H, implemented in some. CPP, and we need to use the method of this some in other. CPP, so we can declare a class some in other. H, and declare the method to be used. This will lead to the above problems,
Solution: include some. H in other.cpp, so the compiler will find the specific definition of class some according to the header file, and the problem will be solved.
Details:
1. Forget to define the header file
2. There is no reference header file
Read More:
- [Solved] Compilation error: dereferencing pointer to incomplete type…
- QtCreator Error: “member access into incomplete type QHeaderView“
- Error:invalid new-expression of abstract class type XXX [How to Solve]
- [Go] Solve the empty interface interface{} cannot use (type []string) as type []interface {}
- C++ new types may not be defined in a return type Error?
- [How to Fix]Type error: must use keyword argument for key function
- Type error: must use keyword argument for key function
- C++ BUG: [Error] invalid array assignment
- C++ Error: terminating with uncaught exception of type std::out_of_range: vector Abort trap: 6
- C++ Use of deleted function error
- [Solved] error C4996: ‘QWheelEvent::pos‘: Use position()
- C++ Compile Error: error: invalid conversion from ‘void*‘ to ‘char*‘ [-fpermissive]
- [Solved] Error c2226: syntax error: unexpected ‘lpstr’ type
- [Solved] Docker Error: WSL 2 installation is incomplete.
- [Solved] NRM Error: error code: ‘err’_INVALID_ARG_Type ‘
- WSL 2 installation is incomplete Error [How to Solve]
- github Error: Logon failed, use ctrl+c to cancel basic credential prompt.
- [Solved] Error C1189: #error: Please use the /MD switch for _AFXDLL builds
- [Solved] Use the truss console to connect to the public blockchain network error: mnemonic invalid or undefined