I want to read a whole text file a once into a single string. I have used the fread() function in the following way:
My input.txt is:
fInp = fopen("input.txt", "r");
fread(buffer, 2, 1000, fInp);
However it produces a string:
i want to read that into a single string
How to get rid of that crap if i do not know beforehand how many characters are my input.txt?
i want to read that into a single stringĚĚĚĚĚĚĚĚĚ<loads of identical crap>ĚĚĚĚĚĚĚĚĚĚĚĚhűbĚĚĚĚĚĚĚĚHűbĚĚĚĚ«_·=\ű