早教吧作业答案频道 -->其他-->
#include"include/apue.h"intmain(viod){intfd;if(fd=open(/home/cheng/apue.2e/test.c,ORDONLY))printf("can'topen\n");elseprintf("ok\n");exit(0);想看下open函数的用法,但是gcc编译时报错test.c:Infunction‘main’:test.c:5:error:expect
题目详情
#include "include/apue.h"
int main(viod)
{
int fd ;
if(fd=open(/home/cheng/apue.2e/test.c,O_RDONLY))
printf("can't open\n");
else
printf("ok\n");
exit(0);
想看下open函数的用法,但是gcc编译时报错
test.c:In function ‘main’:
test.c:5:error:expected expression before ‘/’ token
test.c:5:34:error:exponent has no digits
open函数,我用的不是c库,是linux下api
int main(viod)
{
int fd ;
if(fd=open(/home/cheng/apue.2e/test.c,O_RDONLY))
printf("can't open\n");
else
printf("ok\n");
exit(0);
想看下open函数的用法,但是gcc编译时报错
test.c:In function ‘main’:
test.c:5:error:expected expression before ‘/’ token
test.c:5:34:error:exponent has no digits
open函数,我用的不是c库,是linux下api
▼优质解答
答案和解析
"/home/cheng/apue.2e/test.c"
你用 man open自己看下第一个参数的原型是什么.
你用 man open自己看下第一个参数的原型是什么.
看了 #include"inclu...的网友还看了以下:
输入一个自然数,判断是否为质数(即能被1和它本身整除的数)这个空应该填写什么?#include " 2020-05-16 …
#include"include/apue.h"intmain(viod){intfd;if(fd 2020-07-23 …
C中求三角形面积问题#include#includevoidmain(){doublea,b,c, 2020-07-23 …
hdoj1597杭电1597为何总WA?实在想不通,#include#include#includ 2020-07-23 …
C语言的一道题目?#include#include#include#includeintmain( 2020-07-23 …
代码代码代码求助为毛错了==#include#includeintmain(){\x05float 2020-07-23 …
C语言求三角形面积问题#include#includevoidmain(){doublea,b,c 2020-07-23 …
急!这个inf语句是什么意思?[autorun]OPEN=recycle.{645FF040-50 2020-07-23 …
对下面的程序,描述正确的是.#include“stdio.h”voidmain(){intx=3,y 2020-11-23 …
C#考题中的一道题——功能与其他语句不同A)if(a)printf("%d\n",x);elsepr 2020-12-13 …