RACx0

  • Home

  • Tags

  • Archives

Memory Alignment

Posted on 2018-07-21 | Edited on 2018-08-21

关于内存对齐的一点探讨

Read more »

返回类型与函数重载

Posted on 2018-05-15 | Edited on 2018-10-22

我们知道,函数重载是指在同一作用域内,可以有一组具有相同函数名,不同参数列表的函数,这组函数被称为重载函数

那么为什么我们不能通过返回类型的不同来进行函数重载?

Read more »

Template Base--Function Template

Posted on 2018-05-15 | Edited on 2018-08-21

模板(template)是为了支持泛型编程(Generic programming)而存在的,所谓泛型,也就是不依赖于具体类型,wiki对其定义如下

Generic programming is a style of computer programming in which algorithms are written in terms of types to-be-specified-later that are then instantiated when needed for specific types provided as parameters.

Generic programming —wikipedia

Read more »

Linux之exec族函数

Posted on 2018-04-21 | Edited on 2018-10-22

一直以来都不怎么清楚exec函数族,现在就来总结一下

Read more »

STL之iterator与traits技术

Posted on 2018-04-19 | Edited on 2018-08-01

iterator模式定义如下:提供一种方法,使之能够依序寻访某个聚合物所含的各个元素,而又无需暴露该聚合物的内部表达形式

其中,c++里面各个容器的iterator扮演着将数据容器与算法结合起来的重要角色

将范型算法(find, count, find_if)用于某个容器中,最重要的是要给算法提供一个访问容器元素的工具,iterator就扮演着这个重要的角色

Read more »

C++ Stream IO

Posted on 2018-04-17 | Edited on 2018-10-22

c++ IO由stream 完成,所谓的输入输出,就是字符流入stream和字符流出stream的过程,其中最重要的莫过于

istream定义input stream,用来读取数据

ostream定义output stream,用来写数据

Read more »

Socket之read,write函数

Posted on 2018-04-13 | Edited on 2018-08-01

在socket中,read,write函数不同于一般的文件IO操作

下面开始分析这两个函数在socket中的行为

Read more »

Socket之僵尸进程

Posted on 2018-04-13 | Edited on 2018-08-21

僵尸进程是指完成执行,但是仍有一个对应的PCB残留在进程表中,处于终止态的进程

一般而言,僵尸进程会被父进程wait进行回收,如果没有得到回收或者父进程还没退出,那么就会如同zombie一样一直残留

Read more »

Copy Constructor

Posted on 2018-04-06 | Edited on 2018-08-21

有三种情况会使用到copy constructor

  • 用一个object初始化另一个object
  • 传参(pass by value)
  • 返回值
Read more »

Default Constructor

Posted on 2018-03-29 | Edited on 2018-08-21

首先我们需要认清一件事情

编译器会为我们的类生成default constructor(默认构造函数)之类的成员函数

但是关键在于,产生的条件是在需要的时候

那么,default constructor什么时候才会生成呢?

让我们分情况来讨论

Read more »
1…345

OriginalS

45 posts
17 tags
GitHub
© 2020 OriginalS
Powered by Hexo v3.8.0
|
Theme – NexT.Muse v6.4.2