<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[switchandcase的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/switchandcase</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; switchandcase]]></copyright><item><title><![CDATA[基于TCP、QT制作的小型聊天系统]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/103680719</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/103680719</guid><author>switchandcase</author><pubDate>Tue, 24 Dec 2019 12:44:48 +0800</pubDate><description><![CDATA[实现功能：

好友列表刷新功能
	单聊（发送消息、发送图片）
	接收到的消息均有系统时间记录
	虚拟键盘（利用事件过滤器，设置在点击编辑框时虚拟键盘才会自动弹出）
	实时时钟显示（利用定时器，持续获取系统时间）
	手写画板（利用了QT中的事件、能更改痕迹的粗细大小、更改笔的颜色、截图保存此绘画）
	收消息框、写消息框、好友列表框均可手动调整大小（QT中设置这些输入框布局 分列式垂直水平布局）
	...]]></description><category></category></item><item><title><![CDATA[文件操作之系统IO标准IO格式化IO]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/100710031</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/100710031</guid><author>switchandcase</author><pubDate>Tue, 10 Sep 2019 19:40:55 +0800</pubDate><description><![CDATA[inux 系统IO接口的作用：   操作系统提供给用户访问硬件设备的接口函数。    
		（它可以访问linux系统中的所有文件  普通文件，目录文件，（字符，块）设备文件，链接文件，管道文件，套接字文件）
		

标准IO接口： C 语言库提供给用户访问 《普通文件》  的接口函数。


标准IO 与 系统IO的区别： 
1.标准IO 只可以访问 普通文件  
2.标准IO 带数据缓存.（缓...]]></description><category></category></item><item><title><![CDATA[安装使用JPEG库遇到的问题（用于交叉编译）]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/100584812</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/100584812</guid><author>switchandcase</author><pubDate>Fri, 06 Sep 2019 18:36:48 +0800</pubDate><description><![CDATA[使用JPEG 官方解码库时出现的问题： 

使用example.c 接口编译时： 
1.错误
ubuntu:/mnt/hgfs/GZ1961/linux系统文件IO/day15/newjpeg$ gcc main.c  example.c   -o main 
example.c:3:21: fatal error: jpeglib.h: No such file or directory
co...]]></description><category></category></item><item><title><![CDATA[Linux内核源代码下载]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/89440021</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/89440021</guid><author>switchandcase</author><pubDate>Sun, 21 Apr 2019 21:28:55 +0800</pubDate><description><![CDATA[因为从www.kernel.org官网下载内核源代码很慢

从以下网址下载源代码会快很多

http://ftp.sjtu.edu.cn/sites/ftp.kernel.org/pub/linux/kernel/
]]></description><category></category></item><item><title><![CDATA[一级指针无法从函数里带出字符串，二级指针却能在函数结束后访问字符串地址空间的原因（具体分析）]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/86565191</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/86565191</guid><author>switchandcase</author><pubDate>Sun, 20 Jan 2019 20:16:28 +0800</pubDate><description><![CDATA[
#include&amp;lt;stdio.h&amp;gt;
#include&amp;lt;stdlib.h&amp;gt;

void get_string(char  **p)						
{												
    *p=&quot;hello world&quot;;
}
int main(void)
{
	char *str = NULL;
	get_string(&amp;amp;str);
	printf(&quot;%s\n&quot;,str)...]]></description><category></category></item><item><title><![CDATA[去除字符串中的重复字符（C语言）]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/86552384</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/86552384</guid><author>switchandcase</author><pubDate>Sat, 19 Jan 2019 15:01:40 +0800</pubDate><description><![CDATA[ #include&amp;lt;stdio.h&amp;gt;
  2 #include&amp;lt;string.h&amp;gt;
  3 
  4 int main()
  5 {
  6         char a[30];
  7         char b[30];
  8         bzero(b,sizeof(b));                          //bzero();函数用来清...]]></description><category></category></item><item><title><![CDATA[如何判断字节序]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/86545745</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/86545745</guid><author>switchandcase</author><pubDate>Fri, 18 Jan 2019 20:05:30 +0800</pubDate><description><![CDATA[字节序有两种：

小端字节序：低字节在低地址中，高字节在高地址中。这种字节序又称为主机字节序，intel的cpu使用的就是这种字节序。

大端字节序：低字节在高地址中，高字节在低地址中。这种字节序又称为网络字节序，socket传输时就需要使用这种字节序。
假设我们的32位整数0x12345678是从起始位置为0x00的地址开始存放，则：


	//0x00 0x01 0x02 0x03 
	
	
...]]></description><category></category></item><item><title><![CDATA[用递归法计算斐波那契数列的第n项]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/86543915</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/86543915</guid><author>switchandcase</author><pubDate>Fri, 18 Jan 2019 17:34:16 +0800</pubDate><description><![CDATA[include &amp;lt;stdio.h&amp;gt;

int F(int num)
{
        if(num==0)
        {
                return 0;
        }
        if(num==2||num==1)
        {
                return 1;
        }

        return F(nu...]]></description><category></category></item><item><title><![CDATA[用递归思想计算 x 的 N 次方。x 可以是任意浮点数，N 是整数]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/86536984</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/86536984</guid><author>switchandcase</author><pubDate>Fri, 18 Jan 2019 11:26:00 +0800</pubDate><description><![CDATA[
float my_power2(float x,int N)
{
        float temp;
        temp=1/x;
        if(N==1)
                return x;
        else if(N==0)
                return 1;
        else if(N&amp;gt;0)
             ...]]></description><category></category></item><item><title><![CDATA[二分插入排序]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/84968060</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/84968060</guid><author>switchandcase</author><pubDate>Wed, 12 Dec 2018 11:02:35 +0800</pubDate><description><![CDATA[]]></description><category></category></item><item><title><![CDATA[用vi打开文件时不能编辑的问题]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/83246933</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/83246933</guid><author>switchandcase</author><pubDate>Sun, 21 Oct 2018 23:20:19 +0800</pubDate><description><![CDATA[当用vi打开文件想要正常编辑时，按方向键只会出现A,B,C,D；按del键也没有办法删除；

遇到这个情况是因为，系统预装的是“vim-tiny”而我们要用的是“vim-full”

可以按以下办法解决

首先卸载预装的vim-tiny  输入“sudo apt-get remove vim-common”如果是超级管理员的状态下，不用输入“sudo”；

然后再安装我们需要的“vim-full”...]]></description><category></category></item><item><title><![CDATA[Ubuntu系统中安装NFS遇到的问题]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/83246827</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/83246827</guid><author>switchandcase</author><pubDate>Sun, 21 Oct 2018 23:12:04 +0800</pubDate><description><![CDATA[Ubuntu系统安装NFS时没有安装有  nfs-kernel-server

当我输入“apt-get install nfs-kernel-server” 它提示我：“E: Unable to locate package nfs-kernel-server”

要解决这个问题你可以先输入“apt-get update”

然后再输入命令&quot;apt-get install nfs-kernel-...]]></description><category></category></item><item><title><![CDATA[二级指针原理及结构体数组及结构体指针数组的应用]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/81099660</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/81099660</guid><author>switchandcase</author><pubDate>Wed, 18 Jul 2018 15:55:27 +0800</pubDate><description><![CDATA[指针可以指向一份普通类型的数据，例如 int、double、char 等，也可以指向一份指针类型的数据，例如 int *、double *、char * 等。
如果一个指针指向的是另外一个指针，我们就称它为二级指针，或者指向指针的指针。
假设有一个 int 类型的变量 a，p1是指向 a 的指针变量，p2 又是指向 p1 的指针变量，它们的关系如下图所示：
将这种关系转换为C语言代码：



 
...]]></description><category></category></item><item><title><![CDATA[二维指针应用示例]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/81072225</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/81072225</guid><author>switchandcase</author><pubDate>Mon, 16 Jul 2018 21:48:26 +0800</pubDate><description><![CDATA[
#include&amp;lt;stdio.h&amp;gt;
  2 int sort_two_array(int **buff,int num)
  3 {
  4         int i=0;int j=0;int temp;
  5         int *pload=*(buff+0);
  6         for(i=0;i&amp;lt;3*5;i++)
  7         {
  8   ...]]></description><category></category></item><item><title><![CDATA[直接插入排序算法]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/81072002</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/81072002</guid><author>switchandcase</author><pubDate>Mon, 16 Jul 2018 21:32:51 +0800</pubDate><description><![CDATA[直接插入排序法

]]></description><category></category></item><item><title><![CDATA[定义函数指针]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/81067865</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/81067865</guid><author>switchandcase</author><pubDate>Mon, 16 Jul 2018 16:53:34 +0800</pubDate><description><![CDATA[定义函数指针

例如：



方法定义函数指针的时候，对照着封装的函数编写，去掉形参名就可以了,然后剪切去main函数，这样可以防止凭借自己记忆打字造成的错误

 

具体的运用看下图

...]]></description><category></category></item><item><title><![CDATA[对二维数组指针的理解]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/81067706</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/81067706</guid><author>switchandcase</author><pubDate>Mon, 16 Jul 2018 16:51:00 +0800</pubDate><description><![CDATA[假如有二维数组arr[][].

arr表示数组第一行第一个元素的地址，也可用来表示第一行的总体地址。同理的也有arr[0]。
	arr+1表示二维数组第二行第一个元素的地址，也可以用来表示第二行的总体地址。同理的也有arr[1]。
	*arr 也表示二维数组第一行第一个的首地址，*arr+1表示第二个元素的地址。
	 *(*arr)表示第一行第一个元素的值，而*(*arr+1)则表示第二个元素的...]]></description><category></category></item><item><title><![CDATA[求数组内元素的个数及遇到的问题]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/81062582</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/81062582</guid><author>switchandcase</author><pubDate>Mon, 16 Jul 2018 14:08:58 +0800</pubDate><description><![CDATA[正确写法为下图代码下图为错误上图这样的写法打印的结果会一直是1；下图为运行结果图因为arr是函数参数，到了本函数中，arr只是一个指针（地址，系统在本函数运行时，是不道arr所表示的地址有多大的数据存储空间，这里只是告诉函数：一个数据存储空间首地址），所以sizeof(arr)的结果是指针变量arr占内存的大小，一般在32位机上是4个字节。arr[0]是int类型，sizeof(arr[0])也是...]]></description><category></category></item><item><title><![CDATA[冒泡排序]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/81038377</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/81038377</guid><author>switchandcase</author><pubDate>Fri, 13 Jul 2018 22:19:56 +0800</pubDate><description><![CDATA[冒泡排序第一轮循环                              第二轮循环诸如此类算法函数中，第一个for循环用于设定循环次数，第二个fof循环用于数字间的两两比较。]]></description><category></category></item><item><title><![CDATA[理解for循环嵌套]]></title><link>https://blog.youkuaiyun.com/switchandcase/article/details/81006025</link><guid>https://blog.youkuaiyun.com/switchandcase/article/details/81006025</guid><author>switchandcase</author><pubDate>Wed, 11 Jul 2018 20:08:53 +0800</pubDate><description><![CDATA[理解for循环的嵌套例如       For(1;2; 3)       {              For(4; 5; 6;)              {              }}先执行第一个for语句，再进入第二个for循环，直到不满足5条件跳出第二个for循环；再执行第一个for循环的3；再继续第一个for循环；...]]></description><category></category></item></channel></rss>