03 2021 档案
摘要:注释过的源码太多就不放在这,可以去GitHub查看 下面是测试程序: #include "Exception.h" #include <iostream> class Bar { public: void test() { throw::muduo::Exception("oops"); // 抛出
阅读全文
摘要:在写for循环时,可能大家都会想过是写i++还是++i,表面看两者对for循环并没有什么区别,至于用哪一种 可能更多地是看个人的习惯,笔者之前习惯于使用i++,但是最近看到很多示例代码用的都是++i,我就想到 一个问题,两者用在for循环时,真的没有区别吗?于是我做了一个测试,写了两个for循环,每
阅读全文
摘要:首先是添加注释的源码: // Use of this source code is governed by a BSD-style license // that can be found in the License file. // // Author: Shuo Chen (chenshuo
阅读全文
摘要:首先给出我学习源码时添加的注释: 分别对应Timestamp.h Timestamp.cc文件 // Use of this source code is governed by a BSD-style license // that can be found in the License file
阅读全文
摘要:首先看一下man文档中这三个函数的定义: select函数: #include <sys/time.h> #include <sys/types.h> #include <unistd.h> int select(int nfds, fd_set *readfds, fd_set *writefds
阅读全文

浙公网安备 33010602011771号