We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
源代码:
int help(char *file_name) {/* * Help. * 可以调用如, help("help"),查看help函数的使用方法和内容*/ printf(">>HELP("); printf(file_name); printf(")\n"); char temp_route[_MAX_HELP_LENGTH_] = "../help/"; char temp_txt[5] = ".txt"; strcat(temp_route, file_name); strcat(temp_route, temp_txt); FILE *fp; char ch; fp = fopen(temp_route, "r"); if (fp == NULL) { printf(temp_route); printf(" can not open!\n"); } else { fscanf(fp, "%c", &ch); while (!feof(fp)) { putchar(ch); fscanf(fp, "%c", &ch); } fclose(fp); } printf("\n"); }
修正代码:
int help(char *file_name) {/* * Help. * 可以调用如, help("help"),查看help函数的使用方法和内容*/ printf(">>HELP("); printf(file_name); printf(")\n"); char temp_route[_MAX_HELP_LENGTH_] = "../help/"; char temp_txt[5] = ".txt"; strcat(temp_route, file_name); strcat(temp_route, temp_txt); FILE *fp; char ch; fp = fopen(temp_route, "r"); if (fp == NULL) { printf(temp_route); printf(" can not open!\n"); } else { fscanf(fp, "%c", &ch); while (!feof(fp)) { putchar(ch); fscanf(fp, "%c", &ch); } fclose(fp); } printf("\n"); return 0; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
源代码:
修正代码:
The text was updated successfully, but these errors were encountered: