c/c++基础知识__2018.05.04

1.class中的访问限定符:

public下面的称为:公共接口

private称为:私有接口

2.在c++中把一组数据和有权调用这些数据的函数封装在一起,组成一种称为“类(class)”的数据结构。

一个类是由一批数据以及对其操作的函数组成的。

3.信息隐蔽是c++的一大特点。

4.using namespace std;表示使用标准命名空间。

5.注释只是给人看的,而不是让计算机操作的。

6.c++对c的“增强”,表现在两个方面:

(1)在原来基于过程的机制基础上,对C语言的功能做了不少扩充。

(2)增加了面向对象的机制。

7.类(class)是c++新增的重要数据类型。

8.c++提供了一些基本的数据类型(如int,float,double,char等)供用户使用,但是由于程序需要处理的问题往往比较复杂,而且呈现多样化,已有的数据类型显然不能满足使用要求。因此c++允许用户根据需要自己声明一些。

9.用户自定义数据类型:结构体(struct)类型、共用体(union)类型、枚举(enumeration)类型、类(class)类型。

10.数组中的各元素是属于同一个类型的。

11.除了可以用以上方法声明结构体、共用体、枚举等类型外,还可以用typedef声明一个新的类型名来替代已有的类型名。

typedef int INTEGER;            //指定用标识符INTEGER代替int类型

typedef float REAL;              //指定用标识符REAL代替float类型

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
#0 Homer::RtpSessionState::deprovisionAtDestruction (this=0x7f1fe00e7650) at ../components/mos/state/session_state/src/rtp_session_state.cpp:886 886 ../components/mos/state/session_state/src/rtp_session_state.cpp: No such file or directory. [Current thread is 1 (Thread 0x7f1ffffff700 (LWP 372))] (gdb) bt #0 Homer::RtpSessionState::deprovisionAtDestruction (this=0x7f1fe00e7650) at ../components/mos/state/session_state/src/rtp_session_state.cpp:886 #1 0x00005653759a8e33 in Homer::DeviceState::~DeviceState (this=0x7f1fe00ecf50) at ../components/mos/state/device_state/src/device_state.cpp:87 #2 0x0000565375c4229e in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7f1fe00ecf40) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:155 #3 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7f1fe00bbb08) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:730 #4 std::__shared_ptr<Homer::DeviceStateBase, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7f1fe00bbb00) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:1169 #5 Homer::Device::~Device (this=0x7f1fe00bb070) at ../components/mos/device/src/device.cpp:94 #6 0x0000565375c3c08a in Homer::WebsocketDevice::~WebsocketDevice (this=0x7f1fe00bb070) at ../components/mos/device/src/websocket_device.h:31 #7 Homer::WebsocketClientDevice::~WebsocketClientDevice (this=0x7f1fe00bb070) at ../components/mos/device/src/websocket_client_device.cpp:20
最新发布
06-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值