<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[qq_38988226的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/qq_38988226</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; qq_38988226]]></copyright><item><title><![CDATA[TCP中为什么要随机产生序号？TCP 知识总结（持续更新）]]></title><link>https://blog.csdn.net/qq_38988226/article/details/117417330</link><guid>https://blog.csdn.net/qq_38988226/article/details/117417330</guid><author>qq_38988226</author><pubDate>Mon, 31 May 2021 15:22:25 +0800</pubDate><description><![CDATA[TCP 为什么要引入序号机制？为什么 TCP 三次握手时要协商序号？从 0 开始直接确定序号不行吗？

TCP 引入序号机制原因如下：

保证接收端数据有序接收；
可以根据序号判断是否以前接收过该数据，用于去除重复；
序号机制结合ACK可以完成数据重传。

不可以从 0 开始确定序号，原因如下：

每次建立连接前协商序号主要是为了通信双方能够根据序号将不属于本连接的报文段丢弃；
防止黑客知道序列号后制造攻击。


TCP 三次握手流程？为什么 TCP 要进行三次握手呢？

TCP 三次握手流程如下：
#m.]]></description><category></category></item><item><title><![CDATA[C++ 显示类型转换——4种强制类型转换]]></title><link>https://blog.csdn.net/qq_38988226/article/details/112014829</link><guid>https://blog.csdn.net/qq_38988226/article/details/112014829</guid><author>qq_38988226</author><pubDate>Thu, 31 Dec 2020 15:37:08 +0800</pubDate><description><![CDATA[C++ 显示类型转换——4种强制类型转换
​		强制类型转换，顾名思义，就是将变量或对象通过一定方法显示地进行类型转换的措施。强制类型转换并不改变原对象类型，只是通过原对象生成新的对象。在 C++ 中，一共有 4 种强制类型转换的操作，其分别是：static_cast&lt;newType&gt;,const_cast&lt;newType&gt;, reinterpret_cast&lt;newType&gt; 及dymatic_cast&lt;newType&gt;，其分别用于不同的情况下。
1. st]]></description><category></category></item><item><title><![CDATA[C++ STL容器中不能存储引用类型的原因]]></title><link>https://blog.csdn.net/qq_38988226/article/details/110733006</link><guid>https://blog.csdn.net/qq_38988226/article/details/110733006</guid><author>qq_38988226</author><pubDate>Sun, 06 Dec 2020 12:15:36 +0800</pubDate><description><![CDATA[C++ STL容器中不能存储引用类型的原因
在正式说明问题之前，先介绍一个概念：在 C++ 中，不能声明或定义指向引用的指针。
那为什么不能定义指向引用的指针呢？原因如下：


从设计目的上来讲，设计引用的目的是为了简化指针操作，避免指针造成的一系列问题，如果对引用再取地址的话，有违背设计初衷之意。


从实现角度来讲，引用常常为指针常量，对指针常量取地址（指向指针常量的二重指针）本身便没有意义。C/C++ 中定义二重指针往往是要对一重指针进行修改，而指针常量本身就不能修改，且倘若要访问引用所指变量的地址或]]></description><category></category></item><item><title><![CDATA[C/C++ 头文件中不能定义非 const 及 非 static 变量的原因]]></title><link>https://blog.csdn.net/qq_38988226/article/details/109900487</link><guid>https://blog.csdn.net/qq_38988226/article/details/109900487</guid><author>qq_38988226</author><pubDate>Sat, 21 Nov 2020 16:14:30 +0800</pubDate><description><![CDATA[为什么 C++ 中头文件不能定义非 const 及 非 static 变量？

建议在看这篇博客前先看看我的另一篇博客： C++代码如何成为程序？

刚开始学习 C++ 时，常常会犯一个错误，那就是将变量定义在头文件中，比如下面这种情况：
 代码1：
A.h
#ifndef A_H
#define A_H

int value = 16;

// Other code

#endif // A_H

如果只是在 main.cpp 中包含了这个头文件A.h，那么整个程序运行是没有错误的。
main.cpp
#]]></description><category></category></item><item><title><![CDATA[C/C++多线程之虚假唤醒]]></title><link>https://blog.csdn.net/qq_38988226/article/details/109363451</link><guid>https://blog.csdn.net/qq_38988226/article/details/109363451</guid><author>qq_38988226</author><pubDate>Thu, 29 Oct 2020 16:40:13 +0800</pubDate><description><![CDATA[多线程之虚假唤醒
首先介绍几个函数，是多线程中关于条件变量的：

pthread_cond_wait

int pthread_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex);
														//成功，返回0; 失败，返回错误编号

该函数的主要作用是，将线程放置等待线程队列上，然后阻塞，等待条件发生唤醒线程。其执行步骤如下：

利用 mutex 对 cond 加锁;
进入函数;
将该线程放至条件等待线程队列上;
利用 mutex]]></description><category></category></item><item><title><![CDATA[手把手带你认识从C/C++代码到程序的过程]]></title><link>https://blog.csdn.net/qq_38988226/article/details/108599225</link><guid>https://blog.csdn.net/qq_38988226/article/details/108599225</guid><author>qq_38988226</author><pubDate>Tue, 15 Sep 2020 14:47:01 +0800</pubDate><description><![CDATA[C++ 预处理/编译/汇编/链接 含义
在C++中，一个程序在执行之前需要经历如下几个过程：
#mermaid-svg-gsVF2p7cH4zTAOxV .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-gsVF2p7cH4zTAOxV .label text{fill:#333}#mermaid-svg-gsVF]]></description><category></category></item><item><title><![CDATA[C++ 中 std::cin、std::cin.getline、std::getline几种标准输入之间的区别]]></title><link>https://blog.csdn.net/qq_38988226/article/details/107434836</link><guid>https://blog.csdn.net/qq_38988226/article/details/107434836</guid><author>qq_38988226</author><pubDate>Sat, 18 Jul 2020 20:45:55 +0800</pubDate><description><![CDATA[几种标准输入之间的区别


istream is
is 输入时， 遇见空格、Tab、以及回车符会跳过。
测试代码：
#include&lt;iostream&gt;

using namespace std;

int main()
{
    char first, second;

    cin &gt;&gt; first &gt;&gt; second;

    cout &lt;&lt; "first: " &lt;&lt; first &lt;&lt; endl;
    cout &lt;]]></description><category></category></item><item><title><![CDATA[在网络编程中select不能和stdio混用的问题]]></title><link>https://blog.csdn.net/qq_38988226/article/details/106822609</link><guid>https://blog.csdn.net/qq_38988226/article/details/106822609</guid><author>qq_38988226</author><pubDate>Thu, 18 Jun 2020 08:19:02 +0800</pubDate><description><![CDATA[select函数和stdio不能混用

stdio和系统IO的区别：
stdio : 在用户空间和内核空间都留有缓冲区；
系统IO : 只在内核空间留有缓冲区；
select函数只对于内核缓冲区判断读写就绪。

实验过程：

stdio测试

//stdio
#include&lt;iostream&gt;
#include&lt;sys/select.h&gt;
#include&lt;unistd.h&gt;

using namespace std;

const size_t BUFFSIZE = ]]></description><category></category></item></channel></rss>