<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[when_20的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/when_20</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; when_20]]></copyright><item><title><![CDATA[静态变量是如何逃过内存回收机制的？揭秘它们的不死之谜！]]></title><link>https://blog.csdn.net/when_20/article/details/129360424</link><guid>https://blog.csdn.net/when_20/article/details/129360424</guid><author>when_20</author><pubDate>Mon, 06 Mar 2023 14:39:01 +0800</pubDate><description><![CDATA[原来静态变量与全局变量存放在一起！]]></description><category></category></item><item><title><![CDATA[linux管线命令]]></title><link>https://blog.csdn.net/when_20/article/details/127896501</link><guid>https://blog.csdn.net/when_20/article/details/127896501</guid><author>when_20</author><pubDate>Thu, 17 Nov 2022 17:29:33 +0800</pubDate><description><![CDATA[cut、grep、tee与xargs命令常见使用方法介绍]]></description><category></category></item><item><title><![CDATA[linux 环境变量及其配置方式]]></title><link>https://blog.csdn.net/when_20/article/details/127831373</link><guid>https://blog.csdn.net/when_20/article/details/127831373</guid><author>when_20</author><pubDate>Wed, 16 Nov 2022 17:23:13 +0800</pubDate><description><![CDATA[环境变量是bash进程的变量！！！]]></description><category></category></item><item><title><![CDATA[linux数据流重定向]]></title><link>https://blog.csdn.net/when_20/article/details/127855533</link><guid>https://blog.csdn.net/when_20/article/details/127855533</guid><author>when_20</author><pubDate>Wed, 16 Nov 2022 00:54:37 +0800</pubDate><description><![CDATA[>、2>这符号就该这样来理解！！！]]></description><category></category></item><item><title><![CDATA[linux中su与sudo的区别与联系]]></title><link>https://blog.csdn.net/when_20/article/details/127767888</link><guid>https://blog.csdn.net/when_20/article/details/127767888</guid><author>when_20</author><pubDate>Wed, 09 Nov 2022 21:47:02 +0800</pubDate><description><![CDATA[sudo su的原理原来是这样的！！！]]></description><category></category></item><item><title><![CDATA[linux账号与群组]]></title><link>https://blog.csdn.net/when_20/article/details/127719940</link><guid>https://blog.csdn.net/when_20/article/details/127719940</guid><author>when_20</author><pubDate>Wed, 09 Nov 2022 13:03:48 +0800</pubDate><description><![CDATA[原来有效群组与初始群组是这么回事]]></description><category></category></item><item><title><![CDATA[linux文件权属与权限]]></title><link>https://blog.csdn.net/when_20/article/details/127710168</link><guid>https://blog.csdn.net/when_20/article/details/127710168</guid><author>when_20</author><pubDate>Tue, 08 Nov 2022 19:38:12 +0800</pubDate><description><![CDATA[linux文件rwx权限]]></description><category></category></item><item><title><![CDATA[linux文件特殊权限]]></title><link>https://blog.csdn.net/when_20/article/details/127747687</link><guid>https://blog.csdn.net/when_20/article/details/127747687</guid><author>when_20</author><pubDate>Tue, 08 Nov 2022 19:36:16 +0800</pubDate><description><![CDATA[linux文件权限可不是rwx这么简单！！！]]></description><category></category></item><item><title><![CDATA[linux中与文件系统相关的命令]]></title><link>https://blog.csdn.net/when_20/article/details/127647931</link><guid>https://blog.csdn.net/when_20/article/details/127647931</guid><author>when_20</author><pubDate>Sat, 05 Nov 2022 00:33:58 +0800</pubDate><description><![CDATA[linux系统磁盘分区挂载等相关命令介绍]]></description><category></category></item><item><title><![CDATA[磁盘分区、格式化与挂载]]></title><link>https://blog.csdn.net/when_20/article/details/127642347</link><guid>https://blog.csdn.net/when_20/article/details/127642347</guid><author>when_20</author><pubDate>Wed, 02 Nov 2022 12:13:00 +0800</pubDate><description><![CDATA[这样理解磁盘分区、格式化与挂载，如何呢？]]></description><category></category></item><item><title><![CDATA[软链接与硬链接的区别与联系]]></title><link>https://blog.csdn.net/when_20/article/details/127562411</link><guid>https://blog.csdn.net/when_20/article/details/127562411</guid><author>when_20</author><pubDate>Mon, 31 Oct 2022 18:08:03 +0800</pubDate><description><![CDATA[软链接可以这样子来理解]]></description><category></category></item><item><title><![CDATA[C++ const限定符]]></title><link>https://blog.csdn.net/when_20/article/details/127199621</link><guid>https://blog.csdn.net/when_20/article/details/127199621</guid><author>when_20</author><pubDate>Sat, 08 Oct 2022 17:30:00 +0800</pubDate><description><![CDATA[本文主要记录const限定符在C++中的定义、使用及注意事项]]></description><category></category></item><item><title><![CDATA[C++ inline函数]]></title><link>https://blog.csdn.net/when_20/article/details/127088030</link><guid>https://blog.csdn.net/when_20/article/details/127088030</guid><author>when_20</author><pubDate>Wed, 28 Sep 2022 17:00:30 +0800</pubDate><description><![CDATA[inline函数，比宏好得多]]></description><category></category></item><item><title><![CDATA[写一个函数，求两个整数之和，要求在函数体内不得使用+、-、*、/四则运算符号]]></title><link>https://blog.csdn.net/when_20/article/details/107554300</link><guid>https://blog.csdn.net/when_20/article/details/107554300</guid><author>when_20</author><pubDate>Fri, 24 Jul 2020 10:02:39 +0800</pubDate><description><![CDATA[int Add(int num1,int num2)
{
    int result = 0; 
    int carry = 0; 
    do{ 
        result = num1 ^ num2; //不带进位的加法，相同为0，不同为1 
        carry = (num1 &amp; num2) &lt;&lt; 1; //只有两位同时为1才得进位1，并向前移一位 
        num1 = result; 
        num2 = carry;
     }whi.]]></description><category></category></item><item><title><![CDATA[C/C++ 内存拷贝函数]]></title><link>https://blog.csdn.net/when_20/article/details/107427692</link><guid>https://blog.csdn.net/when_20/article/details/107427692</guid><author>when_20</author><pubDate>Sat, 18 Jul 2020 13:41:39 +0800</pubDate><description><![CDATA[1、char * strcpy(char * dest,const char * src);

对字符串有效，也会将src字符串的'\0'拷贝至目的字符串中，所以在设置目的字符串时注意分配合理的内存空间

2、char *strncpy(char * dest,const char * src,size_t count);

对字符串有效，根据count大小从源字符串中拷贝至目的字符串，不会给目的字符串末尾添加'\0'

3、void * memcpy(void * dest,const void * sr]]></description><category></category></item><item><title><![CDATA[智能指针]]></title><link>https://blog.csdn.net/when_20/article/details/107245127</link><guid>https://blog.csdn.net/when_20/article/details/107245127</guid><author>when_20</author><pubDate>Fri, 10 Jul 2020 15:01:42 +0800</pubDate><description><![CDATA[智能指针是模板类，定义该类的对象变量存放在栈中，智能指针负责管理 指向堆内存的指针变量。众所周知，堆内存的创建与释放需要new/delete操作，这样会出现忘记delete堆内存的情况，从而造成内存泄漏。为此，智能指针就出现了。

原理：智能指针是类，该类创建的对象在栈空间，栈中的变量是局部变量，不用程序员管理，在程序退出作用域后相应的变量被释放，表现为栈顶指针的变化。前面讲过，智能指针负责管理指向堆内存的指针变量，这里，在析构智能指针时，顺便释放堆内存，不就可以很好的避免内存泄漏的问题了。

智能指针所在]]></description><category></category></item><item><title><![CDATA[一个套路解决递归问题]]></title><link>https://blog.csdn.net/when_20/article/details/106761422</link><guid>https://blog.csdn.net/when_20/article/details/106761422</guid><author>when_20</author><pubDate>Sun, 05 Jul 2020 14:05:23 +0800</pubDate><description><![CDATA[在解决一些可以用递归处理的算法题时，无从下笔，没有思路，或有时经常遗漏些步骤。

关于递归的概念这里不再赘述。在面对一个算法题时，如何判断它是否可以用递归解决，以及如何用递归写出来？这是本篇文章的主要内容。

废话不多说，直接先看一道算法题目：


求菲波那切数列的第n项

在面对这道常见的题目时，都能想到是可以用递归来解决，那接下来就分析一下它为什么可以用递归来解决？

假定你就站在第n项上，你要知道该项的内容f(n)，这是一个大问题，你需要知道前两项的内容f(n-1)与f(n-2)，它们是两个子问题；你]]></description><category></category></item><item><title><![CDATA[动态创建二维数组与内存释放]]></title><link>https://blog.csdn.net/when_20/article/details/106871792</link><guid>https://blog.csdn.net/when_20/article/details/106871792</guid><author>when_20</author><pubDate>Sat, 20 Jun 2020 14:43:29 +0800</pubDate><description><![CDATA[创建方法如下：


int rows = 2;
int cols = 3;
int ** maxValues = new int*[rows];  //maxValues为指针，指向存放 rows个 int*类型的数据
for (int i = 0; i &lt; rows; i++){
	maxValues[i] = new int[cols]; //maxValues[i]类型为int*，指向存放 cols个 int类型的数据
}

创建的示意图如下：





赋值：


for (int i = .]]></description><category></category></item><item><title><![CDATA[遍历链表时跳出循环的依据]]></title><link>https://blog.csdn.net/when_20/article/details/106752982</link><guid>https://blog.csdn.net/when_20/article/details/106752982</guid><author>when_20</author><pubDate>Sun, 14 Jun 2020 23:02:52 +0800</pubDate><description><![CDATA[解决链表相关的算法题时，在循环的判断语句中，选择pNode==nullptr 与 pNode-&gt;next==nullptr的问题上举棋不定，处理起来很不顺心。

所以，记录下 选择pNode==nullptr 还是pNode-&gt;next==nullptr 的依据

下面以一道算法题展开讲解，题目为 从尾到头打印链表

链表节点定义如下：


struct ListNode
{
    int m_nKey;
    ListNode * m_pNext;
}

思路为：从头到尾遍历每一个节点，.]]></description><category></category></item><item><title><![CDATA[指针数组与数组指针]]></title><link>https://blog.csdn.net/when_20/article/details/106348575</link><guid>https://blog.csdn.net/when_20/article/details/106348575</guid><author>when_20</author><pubDate>Tue, 02 Jun 2020 10:01:35 +0800</pubDate><description><![CDATA[指针数组：是指 数组 里面装的是指针

数组指针：是指针，该指针指向数组


int * a[5];     //指针数组
int (*b)[5];    //数组指针

对于a，a是数组的首地址，数组a的元素是指针，a所指向的存储单元大小为一个元素的长度，如果指针长度为32位（4字节），则a所指向的存储单元大小为4字节。

对于b，b是指针变量，所指向的存储单元为有5个整型变量的数组。

所以，a+1地址跨度为4字节，b+1地址跨度为4*5=20字节



接下来看一道指针数组题


#include&.]]></description><category></category></item></channel></rss>