有人有兴趣快速看一下。编译器 给了我很多错误,我不知道从哪里开始。这是我第一次使用 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
更多推荐
少数错误
发布评论