1234 TTFFT
5678 FFTTF
9875 ..... (the remaining data are the same structure)
I want to write a program to store first whole integer of each line in a int array
and the char of each line in a char array
UNTIL EOF
How can I write a program in C like that???
更新1:
Sorry, 我意思指要讀左第一個做integer 先 之後 每個 character 再讀入 一個ONE-DIMENSIONAL-ARRAY, 姐係-- TTFFT 就會讀入為, T=key[0], T=key[1], F=key[2] .... 我用fscanf 同 fgetc 都做過, 個program都crash 左 我想問邊做好d...俾一個segement的script我就得 仲用, while ((fscanf(spIn, "%d ", num[i]) )!=EOF) fscanf可唔可以咁樣cehck EOF
更新2:
多謝幫忙 可不可以給e-mail我