易截截图软件、单文件、免安装、纯绿色、仅160KB

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的iptables的nat

192.168.0.201是Linux
192.168.0.35是另外一台装有WEB的服务器,
我想访问192.168.0.201的时候
让他nat到192.168.0.35的80上。
以下是我设置的,但是不行。应该怎么设置呀?

root@ubuntu:/h ......

Linux安装

安装Mandrake9.0后,在命令行,如何进入桌面版?
Mandrake9.0有没有桌面版?
如果用linux桌面版,用哪个版本比较好?跪求下载地址



用UBUNTU吧  这个比较简单

http://distrowatch.com/
......

怎样修改Linux程序

我要修改一个Linux程序中的一个字符串,目的串比原来的长,所以直接替换程序无法运行,要怎么办才能使程序正常运行?
不明白你要干什么 改什么程序?

一个手机上的模拟器,本来是在/mmc/mmca1下创建Roms文件夹, ......

【扫盲】 Linux和UNIX的区别和联系

Linux和UNIX的区别和联系


Linux和UNIX的最大的区别是,前者是开发源代码的自由软件,而后者是对源代码实行知识产权保护的传统商业软件。这应该是他们最大的不同,这种不同体现在用户对前者有很高的自主 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号