Sending data to an array

First of all, I am a C++ beginner, so please keep your responses VERY basic.

I am working on a project that calls a dataset, reads each value, and then determines whether it is even or odd. This I get. However, after I determine if they are even/odd, if I wanted to send all of the even or odd numbers to a new .dat file, how would I do this?!? Please respond ASAP. Thanks in advance!
read fopen, fwrite, fread and fclose if you want to do it in C.
otherwise read iostream like ifstream, ofstream. you can learn to write to file.

http://www.cplusplus.com/reference/iostream/ifstream/
http://www.cplusplus.com/reference/iostream/ofstream/
http://www.cplusplus.com/reference/clibrary/cstdio/
Topic archived. No new replies allowed.