Mic_chen

It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

1、C语言没有像面向对象语言一样提供访问控制的功能,无法实现数据隐藏,可以通过规定成员命名来规避这个问题,例如不允许直接访问的成员以“_”开头。

2、模板模式,利用函数指针,抽离固有代码,差异代码放到函数指针中。
   虚拟设备注册是一种,
   当在C程序中看到goto语句的时候,多半与资源的分配和释放有关。

posted on 2018-05-05 16:45  Mic_chen  阅读(701)  评论(0编辑  收藏  举报