linux 清理缓存问题。
#include "stdlib.h"
#include "stdio.h"
#include "errno.h"
#include "string.h"
#include "netdb.h"
#include "sys/types.h"
#include "sys/stat.h"
#include "fcntl.h"
#include "netinet/in.h"
#include "sys/socket.h"
void client(int ch)
{
int i;
printf("%d",ch);
switch(ch)
{
/********传输文件******/
case 1: _i = flushall();
send();
break;
/********聊天*********/
case 2:
/*********群聊********/
case 3: break;
}
}
/********************************************************************************************
*我在另外一个函数调用了client 函数,然后传过来一个ch,我想在调用_send()函数之前,清理下缓存区,
*因为我在_send函数里还要输入其他变量的值,
* 'flushall'的头文件不是stdio.h吗?我已经包含了。
*为什么提示我连接错误阿?
* undefined reference to `flushall'
相关问答:
写了个测试程序如下
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
大家好,本人目前刚刚接触Linux。现在公司的项目需要缩减Linux的Kernel和APP部分的Code Size。目前我们使用的是Linux2.6.22.15版本,应用于ADSL Modem(家庭网关)。
1.我们产品应用是ADSL Gateway,Kernel部 ......
需要在linux下用中断方式来写一个串口的程序,现在没有思路,网上有人说用select,signal,tasklet函数的,但是我没看懂,希望有做过的给一下例程,多谢!
就是能够当串口数据来临时自动通知串口读取数据,类似于中 ......
Linux新手,请大哥大姐不要见笑。
我用root用户登录到Linux系统。在根目录下面建了目录dir1,后用命令cd /dir1进入到dir1目录下,然后再用mkdir dir2建立了目录dir2 ,再后来用命令cd /dir2是,提示为:-bush ......
我安装了RedHat Fedora Linux 11,播放音乐和视频时提示需要解码器,谁能给我一些解码器,提供可以下载的地址。谢谢~!
引用
VLC
Smplayer
Mplayer
Xine
下载地址???
引用
下 ......