When dealing with specialized stuff like you are, it usually helps to give a little more context and possibly some links to whatever tools, tutorials, etc you're using. Are these files binary or text-based (i.e. can you open them in notepad and read them)?
That aside, this sounds like a fairly basic file reading/writing program. Start of with some simple tutorials to get the handle of file IO in C/C++.
Note, you need to pick one of C or C++, they are two different languages. When you decide, read some tutorials for that language (we have some for each here:
C, C++ Programming Tutorials - Cprogramming.com), and if you have questions, post in the appropriate forum.