Invalid use of incomplete type struct or class solution

Why can’t you stop buying 618?From the technical dimension to explore>>>

Question 1: invalid use of incomplete type

This problem indicates that the compiler does not know the specific implementation of struct or class used. It usually occurs in the following cases: suppose we have a class some defined in some. H, implemented in some. CPP, and we need to use the method of 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 problem. The way to solve this problem is to include some. H in other.cpp, so that the compiler will find the specific definition of class some according to the header file, and the problem will be solved

Similar Posts: