Skip to content

机灵の鹤

机灵の鹤

  • 首页
  • 博客
  • 日记
  • 关于
  • 联系
  • HELLO WORLD

分类: C++基础知识

C++基础知识

什么时候调用拷贝构造函数

  • smartcrane
  • Posted on 2020年10月9日

使用对象 a1 给对象 a2 赋值时。 2. 使用对象 a1 构造对象 a2 时。 3. 实参初始化形参时。 …

Read More
C++基础知识

delete p 和 delete[] p 的区别

  • smartcrane
  • Posted on 2020年10月9日

new p;  对应 delete p; new p[10]  对应 …

Read More
C++基础知识

重载,重写,隐藏的区别

  • smartcrane
  • Posted on 2020年10月9日

重载:函数名相同,参数不同(个数,类型,顺序),调用时根据参数列表确定具体调用哪一个函数 隐藏:类的继承和派生…

Read More
C++基础知识

构造函数和析构函数调用顺序

  • smartcrane
  • Posted on 2020年10月9日

构造函数 基类构造函数,对象成员构造函数,派生类自身构造函数 (多个基类时,按继承顺序) (多个对象成员时,按…

Read More
C++基础知识

指针和引用及其区别

  • smartcrane
  • Posted on 2020年10月9日

参考文档:https://www.cnblogs.com/WindSun/p/11434417.html 指针…

Read More
C++基础知识

面向对象的基本特征

  • smartcrane
  • Posted on 2020年10月9日

封装 把客观事物封装成抽象的类 隐藏对象的属性和实现细节,仅对外公开接口 可以增强安全性,和简化编程 继承 子…

Read More
C++基础知识

父类指针指向子类对象的相关问题

  • smartcrane
  • Posted on 2020年10月9日

父类指针可以指向子类对象,子类指针 不能 指向父类对象 父类指针指向子类对象时: 只能访问父类中有的变量和方法…

Read More
C++基础知识

const char* p 和 char* const p 的区别

  • smartcrane
  • Posted on 2020年10月9日

const char* p 中,const 直接修饰的是 char*,表示的是 p 指针指向的内容,是 con…

Read More
C++基础知识

什么叫内存泄漏

  • smartcrane
  • Posted on 2020年10月9日

内存泄漏,是指因为疏忽或错误造成程序未能释放已经不再使用的内存的情况。 内存泄漏不是指内存在物理上的消失,而是…

Read More
C++基础知识

位运算符

  • smartcrane
  • Posted on 2020年10月9日

^ 按位异或:相同为 0 ,不同为 1 & 按位与:1 1 得 1,否则为 0  |  按位或:0 0…

Read More

文章导航

1 2 下一个

归档

  • C++基础知识 (13)
  • 个人日记 (2)
  • 未分类 (1)

Copyright © All rights reserved. Proudly powered by WordPress | Theme: Blog Nano by ThemeMiles.