Hi..

I want help in C++,
I want to read a file reversly and write it in a new file,
how can I do that?

Thanks for your time..

Recommended Answers

All 2 Replies

What scope of reverse?
Each line? Each character?

Start by saving each line in an array of std::string, then iterate backward through that array.

If it has to be by character, you could add a reverse printing of each std::string by the same method.

If you want more help, at least try to solve this yourself.

Good luck!

thaaaaaaaaaaaaaaaaaaanks..

you saved me i get the idea and i'll try it..

thanks alot.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.