error “base class has incomplete type”

如果base.h是你的基类,那么在子类derive中,写成如下形式:

class base;

class derive: public base{

}

那么就会出现如题的错误。解决这个错误的方法是:替换class base;成#include “base.h”

error “base class has incomplete type”的更多相关文章

  1. error: dereferencing pointer to incomplete type

    /******************************************************************************* * error: dereferenc ...

  2. error: invalid use of incomplete type

    一般出现这种情况都是没有将用到的头文件包含进来 我的情况是在头文件中定义了一个QMenu的指针,在源文件中使用menuBar()函数来返回一个menu指针.我在源文件中包含了文件<QtGui&g ...

  3. Solve Error: 'has incomplete type', foward declaration of 'class x'

    在C++的OOB编程中,有时候我们会遇到这样的错误Error: 'has incomplete type',forward declaration of 'class x',那么是什么原因引起的这个问 ...

  4. error: field 'b' has imcomplete type

    在下面的程序中,在编译时会遇到下面的错误: error: field 'b' has incomplete type 域b是一个不完备的类型,即class B的声明不完备 #include <i ...

  5. error: variable '__this_module' has initializer but incomplete type错误解决

    版权所有,转载必须说明转自 http://my.csdn.net/weiqing1981127 原创作者:南京邮电大学  通信与信息系统专业 研二 魏清 问题描述:使用SAM9X25  内核版本是2. ...

  6. incomplete type is not allowed

    keil环境下,报错#70: incomplete type is not allowed,解决 mqtt_conf.h 定义了一个结构体 mqtt_buffer.h #include <std ...

  7. Render QGraphicsItem on QPixmap: aggregate 'QWidget w' has incomplete type and cannot be defined

    Render QGraphicsItem on QPixmap: aggregate 'QWidget w' has incomplete type and cannot be defined #in ...

  8. std::unique_ptr使用incomplete type的报错分析和解决

    Pimpl(Pointer to implementation)很多同学都不陌生,但是从原始指针升级到C++11的独占指针std::unique_ptr时,会遇到一个incomplete type的报 ...

  9. 关于编译报错“dereferencing pointer to incomplete type...

    今天同事问了我一个问题,他make的时候报错,“第201行:dereferencing pointer to incomplete type”,我随即查阅了很多资料,也没看出个所以然.最后问题得到了解 ...

随机推荐

  1. 【转】Windows环境下Android NDK环境搭建

    原文网址:http://www.metsky.com/archives/525.html 前面介绍Windows下Android 开发环境配置,主要是面向JAVA开发环境,对只做APK上层应用开发人员 ...

  2. (转载)HTTP URL

    HTTP URL的格式如下: http://host[“:”post][abs_path] 其中http表示要通过HTTP协议来定位网络资源.host表示合法的Internet主机域名或IP地址(以点 ...

  3. (转载)static全局变量与普通的全局变量有什么区别?

    (转载)http://www.cnblogs.com/StudyRush/archive/2010/09/25/1834922.html 全局变量(外部变量)的说明之前再冠以static 就构成了静态 ...

  4. 导出Excel帮助类

    using System; using System.Collections.Generic; using System.Text; using System.Data; using System.D ...

  5. HDU 3711 Binary Number

    Binary Number Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Tot ...

  6. Swift的字符串String是值类型

    根据<The Swift Programming Language>中文版基于Xcode6.1的文章描述: Swift的 String 类型是值类型.如果创建了新的字符串,那么当其进行常量 ...

  7. ASP.NET服务器控件OnClientClick事件中Eval()作为js方法的参数的一种写法

    参考代码: <input type="button" OnClientClick='<%#Eval("DeptID", "DelUserD ...

  8. VIJOS-P1340 拯救ice-cream(广搜+优先级队列)

    题意:从s到m的最短时间.(“o"不能走,‘#’走一个花两个单位时间,‘.'走一个花一个单位时间) 思路:广搜和优先队列. #include <stdio.h> #include ...

  9. RPI-Wireless-Hotspot

    http://elinux.org/RPI-Wireless-Hotspot What does it do? This project configures your Raspberry Pi to ...

  10. Linux下如何保持gnome-terminal窗口执行命令后停留而不立刻关闭(gnome-terminal -x)

    Linux下如何保持gnome-terminal窗口执行命令后停留而不立刻关闭(gnome-terminal -x) 转自:http://jakfruit.blog.163.com/blog/stat ...