少数错误

编程入门 行业动态 更新时间:2024-10-24 23:30:04
本文介绍了少数错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有人有兴趣快速看一下。编译器 给了我很多错误,我不知道从哪里开始。这是我第一次使用 isalpha。 #include< stdio.h> #include< stdlib。 h> #define ex exit(EXIT_FAILURE) int main(int argc,char * argv []) { if(argc!= 4){ puts(print usage error); ex; } if(isalpha(argv [1])|| isalpha(argv [2])){ puts(" name is 3rd arg"); ex; } double x,y; FILE * fp; x = strtod(argv [1],NULL); y = strtod(argv [2],NULL); if(fp = fopen(argv [3] ,a)) == NULL){ puts(fopen error); ex; } fprintf(argv [3],"%。2f",x,y); if(fclose(fp)) == NULL){ puts(fclose error); ex; } 返回0; } 我不知道感叹.. Bill

Would anyone be interested in giving this a quick look. The compiler gave me so many errors I don''t know where to start. This is my first use of isalpha. #include <stdio.h> #include <stdlib.h> #define ex exit(EXIT_FAILURE) int main(int argc, char *argv[]) { if (argc != 4) { puts("print usage error"); ex; } if (isalpha(argv[1]) || isalpha(argv[2])) { puts("name is 3rd arg"); ex; } double x, y; FILE *fp; x = strtod(argv[1], NULL); y = strtod(argv[2], NULL); if (fp = fopen(argv[3], "a")) == NULL) { puts("fopen error"); ex; } fprintf(argv[3], "%.2f", x, y); if (fclose(fp)) == NULL) { puts("fclose error"); ex; } return 0; } I dunno sigh.. Bill

推荐答案

在文章< W21lk.68 In article <W21lk.68

EL2.41@trnddc01>," Bill Cunningham" < no **** @ nspamwrote: EL2.41@trnddc01>, "Bill Cunningham" <no****@nspamwrote: 任何人都有兴趣快速看一下。编译器给了我很多错误,我不知道从哪里开始。这是我第一次使用 isalpha。 Would anyone be interested in giving this a quick look. The compilergave me so many errors I don''t know where to start. This is my first use ofisalpha.

也许您应该考虑发布您收到的错误...

Perhaps you should consider posting the errors you received...

" Bill Cunningham"写道: "Bill Cunningham" wrote: 任何人都有兴趣快速看看。编译器 给了我很多错误,我不知道从哪里开始。这是我第一次使用 的isalpha。 Would anyone be interested in giving this a quick look. The compiler gave me so many errors I don''t know where to start. This is my first use of isalpha.

看到大量错误并不罕见。从第一个 错误开始向下工作,这就是编译器遇到它们的方式。 专注,专注,专注! 我已经标记了我在修复通常的互联网修改后找到的第一个。

It is not unusual to see a huge number of errors. Start with the first error and work downward, that''s the way the compiler encountered them. Focus, focus, focus! I have marked the first one I found after fixing the usual internet munging.

> #include< stdio .h> #include< stdlib.h> #define ex exit(EXIT_FAILURE) int main(int argc,char * argv []) { if(argc!= 4){ puts(" print usage error") ; ex; } if(isalpha(argv [1])|| isalpha(argv [2])){ > #include <stdio.h> #include <stdlib.h> #define ex exit(EXIT_FAILURE) int main(int argc, char *argv[]) { if (argc != 4) { puts("print usage error"); ex; } if (isalpha(argv[1]) || isalpha(argv[2])) {

***额外'')''上面

*** extra '')'' above

puts(" name is 3rd arg") ; ex; } double x,y; FILE * fp; x = strtod(argv [1],NULL); y = strtod(argv [2],NULL); if(fp = fopen(argv [3 ],a)) == NULL){ puts(fopen error); ex; } fprintf(argv [3],"%。2f",x,y); if(fclose(fp)) == NULL) { put(fclose error); ex; } 返回0; } 我不知道感叹.. 比尔 puts("name is 3rd arg"); ex; } double x, y; FILE *fp; x = strtod(argv[1], NULL); y = strtod(argv[2], NULL); if (fp = fopen(argv[3], "a")) == NULL) { puts("fopen error"); ex; } fprintf(argv[3], "%.2f", x, y); if (fclose(fp)) == NULL) { puts("fclose error"); ex; } return 0; } I dunno sigh.. Bill

更多推荐

少数错误

本文发布于:2023-11-04 12:19:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1557921.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!