12
18
2013
1

[C++]不允许使用不完整的类

编译器出现该提示,检查是否存在以下几个问题:

  1. 编写类时结尾是否忘记了分号“;”
  2. 声明数组时没有给出大小;
  3. 缺少引用必要的头文件。
Category: C++/C# | Tags: c++ 编译错误 | Read Count: 1831
Avatar_small
Alyssa 说:
2023年1月03日 19:44

C++ requires that classes be fully defined before they can be used. Incomplete class definitions, where some member functions or data members cheap real diamond rings are missing, are not allowed. This is because the compiler needs to know the full definition of a class in order to generate code for it.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com