`
aigo
  • 浏览: 2635758 次
  • 性别: Icon_minigender_1
  • 来自: 宜昌
社区版块
存档分类
最新评论

[C++]error C4150: deletion of pointer to incomplete type ; no destructor called

C++ 
阅读更多

 

error C4150: deletion of pointer to incomplete type 'XXXXX'; no destructor called

 

问题原因可能是下面情况之一:

1,成员变量所在的头文件没有引用;

 

2,A类和B类所属同一命名空间,且A有一个类型为B的成员变量,想通过声明class b的方式不在A的头文件中引用B的头文件,但是却把声明放在了命名空间外,例如:

class B;

namespace SP

{

class A

{

B* b1;

}

}

 

正确的方式是将声明放到命名空间内: 

namespace SP

{

class B;

class A

{

B* b1;

}

}

 

分享到:
评论

相关推荐

    acpi控制笔记本风扇转速

    operand to be an operation region of any type. It is now restricted to regions of type SystemMemory, as per the ACPI specification. BZ 481 Additional cleanup and optimizations for the new Table ...

    Overview of the New C++ (C++0x)

    - **C++11**:C++11是C++语言自C++98以来最重要的更新之一,它引入了许多新特性以提高开发效率、代码质量和性能。 - **C++98**:这是C++语言的第一个国际标准版本,于1998年发布,为后续版本奠定了基础。 ##### 新...

    SSD7 选择题。Multiple-Choice

    A deletion operation will _____ if the deletion leads to the violation of a referential integrity constraint. (a) fail (b) succeed with warning (c) succeed without warning (d) crash the ...

    CE中文版-启点CE过NP中文.exe

    Added cut/copy/paste context menu items to pointer offset fields in add/change address, and added a context menu to the pointer destination Added an automated structure compare for two groups of ...

    数据结构PPT优秀资料.ppt

    最后,PPT touches on the topic of graph traversal, including the implementation of depth-first search (DFS) and the deletion of vertices and edges. 线性表管理 在线性表管理中,PPT introduces the ...

    Senfore_DragDrop_v4.1

    Delphi 3 or C++ Builder 3 support you will have to revert to version 3.7 of the Drag and Drop Component Suite. The library has been tested on NT4 service pack 5 and Windows 2000. Windows 95, 98, ME ...

    DriverStoreExplorer.v0.8.4.2查看windows驱动程序

    Add a driver package to the driver store (called staging) Install & Add a driver package to the store. Delete a package from the store. Force deletion supported. Deletion of multiple driver packages ...

    c++试题大家可以看看,对初学者应该有用吧!!!!!

    【C++基础知识】 C++是一种面向对象的编程语言,它具有强大的功能和高效性。对于初学者来说,理解和掌握C++的基本概念是非常重要的。 1. **C++程序结构**: - C++程序通常由一个或多个函数构成,其中至少包含一个...

    gerrit-3.0.3.war

    Utility script remove-notedb-refs.sh which can be used to remove all refs created for NoteDb in case of rollback to ReviewDb. Issue 11356: Allow to override autodetected Lucene index configuration. ...

    Algorithms and Data Structures - Niklaus Wirth

    **The Array Structure**: Arrays are collections of elements of the same type stored contiguously in memory. Wirth explains how arrays can be one-dimensional or multi-dimensional. **The Record ...

    Skip Lists:A Probabilistic Alternative to Balanced Trees

    跳表,A Probabilistic Alternative to Balanced Trees.Skip lists are data structures thla t use probabilistic balancing rather than strictly enforced balancing. As a result, the algorithms for insertion...

    Collections

    Pointer collection classes can also be configured for arbitrary pointer use, allowing them to hold any type of pointer, including non-object pointers. #### Working with Collections: Copying and ...

    myBase Desktop V7.0.0 B22 专业版

    corrections to the default focus policy within confirmation popup windows, the 'Yes' button has initial focus for Save-specific operations, and the 'No or Cancel' has initial focus for Deletion-...

    Spectral Core Full Convert Enterprise v6.11.0.1683

    SQL scripts can be written in Full Convert editor, or dynamically loaded from external file, even if it is compressed - and file type mask can be specified to ignore certain files Global Options SQL ...

    C语言学生成绩管理系统

    C语言建立一个学生成绩管理系统 功能:1、输入:函数input把10个学生的学号、姓名、3科成绩以及平均成绩和总成绩放在一个结构体数组中,学生的学号、姓名、3科成绩可由键盘输入也可由文件读取,然后计算出平均成绩和...

    Flagging Material Master Records for Deletion

    这个过程涉及到一个关键操作,即“Flagging Material Master Records for Deletion”。 首先,理解“flagged for deletion”意味着物料主记录被标记为待删除状态,这是系统进行清理和归档的前提。在执行实际的删除...

    HxD HeX Editor 英文绿色版

    - Exporting of data to source code (Pascal, C, Java, C#, VB.NET) or as formatted output (plain text, HTML, Richtext, TeX) or to hex formats Motorola S19 Records, Motorola S28 Records, Motorola S37 ...

    计算机专业英语词汇.pdf

    例如:“Move the cursor to the start of the document”(将光标移动到文档的开始位置)。 16. directory: 目录。存储文件和子目录的文件夹。例如:“List the contents of the directory”(列出目录的内容)。 ...

Global site tag (gtag.js) - Google Analytics