- 最後登錄
- 2024-5-2
- 在線時間
- 0 小時
- 註冊時間
- 2008-10-22
- 閱讀權限
- 20
- 精華
- 0
- UID
- 5183946
- 帖子
- 245
- 積分
- 201 點
- 潛水值
- 13562 米
| 回覆中加入附件並不會使你增加積分,請使用主題方式發佈附件。 本帖最後由 scottcheng 於 2014-10-9 11:13 PM 編輯
隨便寫寫僅供參考
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- char filename[128];
- FILE *fp;
- int c;
-
- print_f("Enter filename: ");
- scanf("%s", filename);
-
- fp = f_open(filename, "rb");
-
- if (fp == NULL) {
- print_f("error to open %s\n", filename);
- system("pause");
- return 1;
- }
-
- print_f("==== %s start =====\n", filename);
-
- while((c = fgetc(fp)) != EOF) {
- print_f("%c", c);
- }
- system("pause");
- return 0;
- }
複製代碼
... |
|