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.
1. Forget to define the header file
2. There is no reference header file
- Visual Studio 2012 error C4996: ‘scanf’: This function or variable may be unsafe.
- Keil’s duplicate definition problem: Error: L6200E: Symbol F6x8 multiply defined
- Solution for Visual Studio 2012 compilation error [error C4996:’scanf’: This function or variable may be unsafe.]
- Tensorflow C++：You must define TF_LIB_GTL_ALIGNED_CHAR_ARRAY for your compiler
- [Solved] C++ error: undefined reference to `xxx‘
- [Solved] Compilation error: dereferencing pointer to incomplete type…
- Solve error LNK2001 about pcl::io::vtkPolyDataToPointCloud
- A mistake about implicitly providing default constructors
- Solution of adding H264 error in ffmpeg compilation
- Android Error: Found item attr/tabtextsize more than one time
- [Solved] TS Error: Could not find a declaration file for module
- How to Solve Error: “initializer element is not constant”
- Error 2 error c2491: XX: definition of dllimport static data member is not allowed
- Hash_map is deprecated and will be REMOVED. Please use unordered_map.
- mybatis-plus calls its own selectById method and reports an error: org.apache.ibatis.binding.BindingException:
- QT solves error: use of deleted function and is private within this context
- Tomcat Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors
- C++ new types may not be defined in a return type Error?
- How to Solve Error: Type mismatch: cannot convert from Object to Car
- C++ Error: terminating with uncaught exception of type std::out_of_range: vector Abort trap: 6