Hi, I want to filter out numbers from text rows in a textfile. But can't find a way to do it. Do you guys have an idea? Right now I have a code that just printing out the text lines in my file and how many lines there is as you can see.
1 2 3 4 5 6 7 8 9 10 11 12 13
ifstream inputfile(filename);
char text;
int n = 0;
while (inputfile.get(text))
{
cout.put(text);
if (text == '\n')
++n;
}
cout << endl << There is " << n << " rows of text";