tried to look on forums but could not reslove.
I'm trying to read from text. Text is: "To b"
But while using fgetc(), EOF is not reached, and at the end I get '\n' and then infinity 'y' samples.
Here's my code:
Node* getBinTree(FILE *fsrc){
Node* root=NULL;
unsigned char tmp=NULL;
while ((tmp=fgetc(fsrc))!=EOF)
globalArray[tmp]++;
return root;
}
thanks a lot