ymkzpx

Success and failure are temporary.


  • Home

  • Archives

  • Tags

  • About

struct和class的区别

Posted on 2018-12-20 | In Program , C++

struct和class的区别


结构体的默认限定符是public;类是private。

struct的构造函数

  • 不提供构造函数,可以用参数列表初始化
  • 提供默认构造函数,不可以可以用参数列表初始化
  • 可以自定义构造函数,然后用参数列表初始化。
# Program # C++
C++ Primer Plus 学习之 类和动态内存分配
new和malloc的区别
Kzpx

Kzpx

Hello the cruel world.

215 posts
133 categories
100 tags
GitHub
Links
  • CS-Notes
  • Ali-CsNotes
  • Deadline
  • luowentao
  • biubiubiu
  • Gstnt
  • ecnu
  • Lzy
  • Menci
  • kuangbin
  • meopass
  • tokitsukaze
  • cubercsl
  • Claris
  • hzwer
  • qscqesze
  • ICPCCamp
  • ZYF
  • xehoth
  • Ocean
  • MrBird_to_fly
  • starry_sky
  • Multi-school AC>=20
  • snowy_smile
  • fjzzq2002
© 2019 Kzpx
Powered by Hexo
|
Theme — NexT.Mist v5.1.4