<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[sunflower_sx的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/sunflower_sx</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; sunflower_sx]]></copyright><item><title><![CDATA[C++（new与delete操作符）]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/140534589</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/140534589</guid><author>sunflower_sx</author><pubDate>Thu, 18 Jul 2024 22:51:14 +0800</pubDate><description><![CDATA[这里需要明确，在C++中，new 的最底层实际调用的也是malloc,但除此之外还会调用被new类型的构造函数，delete 的最底层则是free，但除此之外还会调用被delete类型的析构函数。new delete 与 new[] delete[] 不要进行错配使用！在C++中需要动态申请内存空间时需要使用 new 与 delete 这两个操作符。由此可见，new和delete在使用时会调用对应的构造和析构函数。]]></description><category></category></item><item><title><![CDATA[C++（拷贝构造与赋值重载）]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/140452030</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/140452030</guid><author>sunflower_sx</author><pubDate>Tue, 16 Jul 2024 00:23:56 +0800</pubDate><description><![CDATA[拷贝构造是一种特殊的构造函数，它显式的第一个参数是本类类型的引用，如果还有其他参数的话，其他参数必须有默认值（一般情况没有其他参数，只有类类型引用）class Datepublic://默认构造函数,_day(day){}//拷贝构造,参数只有本类型引用//赋值运算符重载，稍后会讲cout << _year << "年" << _month << "月" << _day << "日" << endl;int _month;]]></description><category></category></item><item><title><![CDATA[初识C++（构造函数和析构函数）]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/140357911</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/140357911</guid><author>sunflower_sx</author><pubDate>Thu, 11 Jul 2024 21:00:45 +0800</pubDate><description><![CDATA[析构函数的功能与构造函数相反，但它也并不是用来销毁对象，而是完成对对象中资源的清理释放工作，例如当对象中使用malloc动态申请了内存资源后，在对象使用结束或者程序结束时就需要析构函数来清理释放对象所申请的内存资源。]]></description><category></category></item><item><title><![CDATA[初识C++（inline内联函数与nullptr空指针）]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/140337065</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/140337065</guid><author>sunflower_sx</author><pubDate>Wed, 10 Jul 2024 23:55:14 +0800</pubDate><description><![CDATA[在C++11引入了nullptr的概念，它实际是一个特殊的关键字，可以被转换为其他任意类型的指针，且它只能被转换为指针类型而不能转换为整数类型，这就能避免特殊情况下的歧义问题。由此可见，虽然我们认为NULL指的是空指针，但是实际在调用时编译器会认为这就是整数0，从而在一些特定情况下导致结果错误。在C++中，为了代替宏函数，设计了内联函数的概念，当一个函数被inline修饰时便成了内联函数。这里的swap函数被inline修饰，当它被调用时，会直接在调用处展开代码，类似于宏，这样就。]]></description><category></category></item><item><title><![CDATA[初识C++（引用相关知识）]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/140334577</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/140334577</guid><author>sunflower_sx</author><pubDate>Wed, 10 Jul 2024 22:08:08 +0800</pubDate><description><![CDATA[类型& 别名=引用对象;int& b = a;//对a取一个别名bb = 10;//对别名进行修改实际就是修改对象a的值return 0;]]></description><category></category></item><item><title><![CDATA[初识C++（函数重载）]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/140309145</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/140309145</guid><author>sunflower_sx</author><pubDate>Tue, 09 Jul 2024 23:29:00 +0800</pubDate><description><![CDATA[下面这种情况确实构成重载，但是在调用F()函数时会出现错误，因为有一个缺省参数所以编译器不知道调用哪一个。只有返回值不同是不能构成重载的，如下图便会报错。]]></description><category></category></item><item><title><![CDATA[初识C++（命名空间、缺省参数）]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/140306054</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/140306054</guid><author>sunflower_sx</author><pubDate>Tue, 09 Jul 2024 23:02:49 +0800</pubDate><description><![CDATA[关键字，namespace可以定义一个命名空间，即命名空间域，而这个域与全局域是相互独立的，不同的域可以定义同名变量，从而避免命名冲突。在C++中，为了尽可能避免命名冲突，需要对各个变量进行域作用限定，这就需要使用到。这种方式容易导致命名冲突，项目中一般不推荐。3.使用using将命名空间全部展开，即。需要注意的是，C++的标准库都存放在。命名空间的使用有三种方式。]]></description><category></category></item><item><title><![CDATA[C语言结构体相关知识详解]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/136977664</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/136977664</guid><author>sunflower_sx</author><pubDate>Sun, 24 Mar 2024 15:50:27 +0800</pubDate><description><![CDATA[本文主要介绍了C语言结构体的相关知识]]></description><category></category></item><item><title><![CDATA[C语言整数与浮点数在内存中的存储]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/136855236</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/136855236</guid><author>sunflower_sx</author><pubDate>Tue, 19 Mar 2024 22:04:01 +0800</pubDate><description><![CDATA[本文主要介绍了C语言整数与浮点数在内存中存储的区别]]></description><category></category></item><item><title><![CDATA[C语言内存函数(memcpy,memmove,memset,memcmp)]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/136789715</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/136789715</guid><author>sunflower_sx</author><pubDate>Sun, 17 Mar 2024 21:58:32 +0800</pubDate><description><![CDATA[本文主要讲解了C语言相关内存函数的知识，例如memcpy,memmove,memset等等]]></description><category></category></item><item><title><![CDATA[C语言字符函数和字符串函数]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/136764510</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/136764510</guid><author>sunflower_sx</author><pubDate>Sat, 16 Mar 2024 18:53:12 +0800</pubDate><description><![CDATA[C语言字符函数及字符串函数的内容详解]]></description><category></category></item><item><title><![CDATA[C语言指针相关内容详解3(指针数组，数组指针，函数指针，函数指针数组)]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/136582956</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/136582956</guid><author>sunflower_sx</author><pubDate>Sat, 09 Mar 2024 15:59:40 +0800</pubDate><description><![CDATA[本文主要介绍了指针中指针数组，数组指针，函数指针以及函数值指针数组的相关知识]]></description><category></category></item><item><title><![CDATA[C语言指针相关内容详解2(数组名的理解，使用指针访问数组，二级指针)]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/136570637</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/136570637</guid><author>sunflower_sx</author><pubDate>Fri, 08 Mar 2024 21:05:56 +0800</pubDate><description><![CDATA[C语言的相关内容第二篇，包括数组名的理解，使用指针访问数组，以及二级指针的简单介绍]]></description><category></category></item><item><title><![CDATA[C语言指针相关内容详解1 (指针变量，指针运算，野指针)]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/136492418</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/136492418</guid><author>sunflower_sx</author><pubDate>Fri, 08 Mar 2024 19:17:11 +0800</pubDate><description><![CDATA[详解C语言指针内容中的指针变量，指针运算以及野指针相关知识]]></description><category></category></item><item><title><![CDATA[qsort函数的使用及模拟实现]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/136432051</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/136432051</guid><author>sunflower_sx</author><pubDate>Sun, 03 Mar 2024 15:46:51 +0800</pubDate><description><![CDATA[主要介绍了c语言中的qsort函数以及模拟实现]]></description><category></category></item><item><title><![CDATA[C语言实现扫雷游戏]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/135971868</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/135971868</guid><author>sunflower_sx</author><pubDate>Thu, 01 Feb 2024 13:56:44 +0800</pubDate><description><![CDATA[使用c语言实现简单的扫雷游戏]]></description><category></category></item><item><title><![CDATA[break 和 continue 在 for 循环与 while 循环中的区别与联系]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/135862197</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/135862197</guid><author>sunflower_sx</author><pubDate>Fri, 26 Jan 2024 12:36:05 +0800</pubDate><description><![CDATA[由此可见，代码并没有死循环，这是因为for循环与while循环的循环变量调整的位置不同导致continue语句的执行结果不同，这就是continue语句在两个循环语句中的不同之处。对于do while 语句，其break语句与continue语句的使用情况基本与while语句一样，可自行体会。break 的作用是永久终止循环，当break被执行时，将直接跳出循环，从而继续执行接下来的语句。由此可知对于break语句，在for循环和while循环中结果是一样的都是跳出循环永久终止循环。]]></description><category></category></item><item><title><![CDATA[C语言循环相关知识详解（for、while、do while）]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/135860544</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/135860544</guid><author>sunflower_sx</author><pubDate>Fri, 26 Jan 2024 11:16:22 +0800</pubDate><description><![CDATA[在C语言中主要有三种语句实现循环结构，分别是语句。]]></description><category></category></item><item><title><![CDATA[C语言分支相关知识详解（if、switch语句）]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/135818643</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/135818643</guid><author>sunflower_sx</author><pubDate>Wed, 24 Jan 2024 13:47:43 +0800</pubDate><description><![CDATA[在C语言中主要采用两种语句实现分支结构，分别为if语句和switch语句。]]></description><category></category></item><item><title><![CDATA[以scanf（）函数的返回值作为循环结束条件详解]]></title><link>https://blog.youkuaiyun.com/sunflower_sx/article/details/135720134</link><guid>https://blog.youkuaiyun.com/sunflower_sx/article/details/135720134</guid><author>sunflower_sx</author><pubDate>Sat, 20 Jan 2024 22:08:20 +0800</pubDate><description><![CDATA[1.首先我们需要了解对于C语言，以0为假非0为真（C99之后有了_Bool类型，即true为真false为假）]]></description><category></category></item></channel></rss>