i have three integers per line in a text file but when i read a file it prints four integers
Code:
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
void main()
{
int clas;
ifstream inf;
inf.open("kash.txt");
do
{
inf>>clas;
cout<<clas;
}
while(!inf.eof());
}
here is the file kash.txt (no enter after the 3rd integer)
1
2
3
and why am getting the result as
1233