早教吧作业答案频道 -->其他-->
#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...的网友还看了以下:
英语翻译N-Retinyl-3-silyl-n-propylamine怎么翻译 2020-03-31 …
请求翻译乱码请高手翻译下什么意思啊?亅酰谎u知欋5??k(so?笿?(n?豃]?n#?k(so? 2020-04-06 …
九年级英语Units6~7词汇扩展peacefuladj.→()n.→()adv.includin 2020-05-02 …
英语翻译[/n/ /e:/ /f/ /er/]后面发"枫"音的 2020-05-15 …
英语翻译n.表示什么呢?还有pron, 2020-06-04 …
英语翻译n投资咨询n整厂(一站式服务)A设计B设备选配C无菌净化车间(无菌冷却车间、无菌接种车间) 2020-06-04 …
翻译n(临近)w(写) 2020-07-22 …
#include"include/apue.h"intmain(viod){intfd;if(fd 2020-07-23 …
英语翻译N.CognomeenomeWANGFEDERICOnatoaAPRILIAilvian.V 2020-10-30 …
英语翻译N,S极就是表明磁铁南北极的写成N,S极怎么翻译表达清楚? 2020-11-01 …