http://gall.dcinside.com/board/view/?id=programming&no=495034&page=2 아까 이글에서 엔터는 포기..


while (1)

{

tmp = fgetc(text);    //check every character


if (tmp == ' ')        //find blank(Space-Bar)

{

fseek(text, -chCount, SEEK_CUR);

//move file cursor to head of a word

word = (char*)malloc(sizeof(char)*(chCount));

//dynamic allocation for single word

fscanf(text, "%s", word);

//store word from text.txt to char* word

printf("%d ", strlen(word));

//print length of word array(string)

puts(word);

vCount += checkBEv(word);

//check whether beV or not

free(word);

//delete array

chCount = 0;

//chCount means length of single word

//after checking word, clear it zero

fseek(text, 1, SEEK_CUR);

//for skip blank. IT IS NECESSARY!

}

chCount++;

//for skip blank. IT IS NECESSARY!


if (tmp == '\0' || feof(text) != 0) //find EOF

{

puts("Reading Finished");

break;

}

}


중간에 엔터 없이 Joseph R. “Beau” Biden III, the former Delaware Attorney General and son of Vice President Joe Biden, died at 46 after battling brain cancer, the Vice President’s office announced Saturday night. 라는 문장을 그대로 읽어들이는데


다 잘 되는데 맨 끝의 night.부분을 그냥 스킵해버리네.. nignt. <-이렇게 스페이스바 한칸 해주면 night.도 인식은 하는데.. 이를 어쩌면 좋습니까..