Data Filter

Oct 3, 2011 at 11:37am
So, I'm currently enrolled in a C++ class and our homework assignment is to make a program that filters out and counters the integers from a file and prints everything else into a new file. I have everything working except for the filter code. Can someone go about showing me what I would have to put to make it filter out the integer values and place the non-integer values into the new file?
Oct 3, 2011 at 11:43am
By "I have everything working except the filter code", do you perhaps mean "The teacher gave me everything excep the filter code"?

Anyway, depending on how the values are read, you could use the isdigit() function.
http://www.cplusplus.com/reference/clibrary/cctype/isdigit/
Oct 4, 2011 at 2:56am
I mean I have everything running to read in values and to print out most values, however I am having an issue with the white spaces and + and - sings.
Oct 5, 2011 at 2:07am
ESE 224?
Topic archived. No new replies allowed.