dereferencing pointer to incomplete type

前端 未结 7 1407
梦谈多话
梦谈多话 2020-12-08 01:37

I\'ve seen a lot of questions on this but I\'m going to ask the question differently without specific code. Is there a way of EASILY determining w

7条回答
  •  孤城傲影
    2020-12-08 02:12

    I don't exactly understand what's the problem. Incomplete type is not the type that's "missing". Incompete type is a type that is declared but not defined (in case of struct types). To find the non-defining declaration is easy. As for the finding the missing definition... the compiler won't help you here, since that is what caused the error in the first place.

    A major reason for incomplete type errors in C are typos in type names, which prevent the compiler from matching one name to the other (like in matching the declaration to the definition). But again, the compiler cannot help you here. Compiler don't make guesses about typos.

提交回复
热议问题