I tried to read in data from a text file using fstream but got wrong data.
ifstream fin ("C:\\Users\\rEgonicS\\Documents\\test.in");
int number;
fin >> number;
cout << number;
test.in is simply "12".
cout reads 4273190. Can someone explain why this is so and how to fix it?
Thanks in advance.
*Stackoverflow thought I was a bot ; o ;.