易截截图软件、单文件、免安装、纯绿色、仅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/C++程序员上海工资水平

熟悉Linux,C/C++,有一年的工作经验,请问在上海能拿多少?
我sz的
等sh的回答

关注

一年的工作经验的人,根据你的学校,和学历来看.

我一个实验室的学长,上海,做LINUX驱动开发,2年 6000/月,实到手56 ......

Linux安装

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



用UBUNTU吧  这个比较简单

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

linux UDP client接收不到数据

我在linux下写了个UDP的server和client的代码,
现在出了这样一个问题,

server收到了client的数据,并回复了,但是client一直收不到server回复的内容,,后来我用抓包工具建立了一个server来连接之前的cl ......

Web工程放到linux服务器上出现错误

出现这个错误。不知道是我代码的问题还是服务器的问题。
javax.servlet.ServletException: unable to create new native thread
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageConte ......

关于LINUX操作系统的安装

    我没有安装操作系统的经验,即使是WINDOWS。现在想在LINUX操作系统大环境下学C语言,又要买本本,请问如果操作系统安装不当,会不会对电脑造成什么大的破坏?有没有必要先买一个二手电脑练一下LINUX的 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号