linux程序打不开头文件
#include <fcnt1.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc,char *argv[])
{
int fd_open,fd_open_create,fd_create;
if((fd_open=open("/home/wang/test/hello.c",O_RDONLY))==-1)
{
perror("open");
exit(EXIT_FAILURE);
}
printf("the file's descriptor is:%d\n",fd_open);
if((fd_open_create==open("./tmp1",O_CREAT|O_EXCL,0644))==-1)
{
perrno("open");
exit(EXIT_FAILURE);
}
printf("the tmp1 file descriptor is:%d\n",fd_open_create);
if((fd_create=creat("./tem2",0644))==-1)
{
perrno("create");
exit(EXIT_FAILURE);
}
printf("the tmp2 file descriptor is:%d\n",fd_create);
close(fd_open);
close(fd_create);
close(fd_open_create);
return 0;
}
编译结果
wangjun@my-desktop:~/test$ gcc -ggdb3 -o open_example open_example.c
open_example.c:1:19: 错误: fcnt1.h:没有该文件或目录
open_example.c: 在函数‘main’中:
open_example.c:8:
相关问答:
我在linux下写了个UDP的server和client的代码,
现在出了这样一个问题,
server收到了client的数据,并回复了,但是client一直收不到server回复的内容,,后来我用抓包工具建立了一个server来连接之前的cl ......
这里看不懂。。
有这个命令吗?
type d
试试看是不是别名或是函数名
这是在cygwin下运行的,还是看不明白。
输入了 type d 以后变成这样:
看不到图片
没有这个命令,是不是一个 ......
mysqladmin -u root drop 数据库名
这样删除会要求按y 确定
有没有参数加在后面 让我不用按y确认也可以删除
mysql -u root -e "drop databse 数据库名"
SQL code:
mysql> drop datab ......