首頁
程式語言
工具下載
學習範例
技術專區
相關書籍
原始碼程式範例
好站相報
技術論壇
易尋網
ASP空間租賃
汽車追蹤的第一個家
弘光科技大學
南開技術學院
巨匠電腦
買賣購物網
Life Light
遠距醫療網
清境民宿珂之幄
原始程式碼
#include <stdio.h> #include <conio.h> #include <process.h> void main(void) { FILE *stream; int num; int sum = 0; clrscr(); stream = fopen("c:\\test.txt","r"); if (stream == NULL) { printf("Error Read File\n"); exit(1); } printf("Reading.....\n"); while ((num=fgetc(stream))!=EOF) { sum = sum + 1; printf("%c",num); } fclose(stream); printf("\nthere are %4d characters in the file....\n", sum); getch(); }
1. 請點選此處複製以上資料
2. 請按
ctrl-c
複製到剪貼簿
3. 切換到ASP的原始內碼區
4. 請按
ctrl-v
貼上所有資料