(SOLVED!)
Hey there.I've been having this issue for awhile, and its not too bad. Its just, whenever I use fread to read from a text file to print to the screen, it also prints random characters that aren't suppose to be there. I've tried looking on Google but couldn't find an answer. Well, I did find answers but none of them worked for me.
That's my current code; why are random characters being printed?Code:FILE *title; char titlestr[713]; title = fopen(".//text//title.txt", "r"); fread(titlestr, sizeof(titlestr), 1, title); printf("%s", titlestr);



1Likes
LinkBack URL
About LinkBacks
I've been having this issue for awhile, and its not too bad. Its just, whenever I use fread to read from a text file to print to the screen, it also prints random characters that aren't suppose to be there. I've tried looking on Google but couldn't find an answer. Well, I did find answers but none of them worked for me.



