Im having problems reading 2 or more digit numbers,like 30 and 43 , I think get is turning my charecters into asci codes thats why Im able to count spaces and commas and single digit numbers between 0 and 9.
What I want to do is count how many times numbers within a certain range appear in my file, what should I do?
Code:
int main()
{
int i=0,l=0,k=0;
int j[65]={0};
ifstream one;
one.open("test.txt");
//character
int c;
while (one.good())
{
c=one.get();//get character
for(i=0;i<65;i++)
{
if(c==i)
{
j[i]++;
}
}
}
return 0;
}