If you don't know the C++ language, then you should probably read a beginner's book (such as this).
But let's start with you do know. Do you know what iterators are? Do you know what algorithms...
Type: Posts; User: Elysia
If you don't know the C++ language, then you should probably read a beginner's book (such as this).
But let's start with you do know. Do you know what iterators are? Do you know what algorithms...
Have you tried? If so, post your code.
Make a small program from scratch that applies these techniques to practice them. Once you've got that down, you can apply it to your big problem.
Input iterators may be helpful.
Other than that, there are a lot of algorithms that work with iterations and there are also output formatting for writing to file/console (ostream).