954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

help me please

hi
i am student and a begginer to c++..i dont know what to do regarding this problem i need help.please help me to solve my assignment.
Q:To Write a program in C++ that reads the name of a file as input and copies the contents of the file in reverse order (i.e. last line becomes first and so on) to another file . The program should also handle errors and give appropriate messages.?
i will be looking intently :?: for your help.

thanking you in anticipation
muaaz

muaaz
Newbie Poster
1 post since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

Show me what you have so far.

big146
Newbie Poster
18 posts since Jul 2004
Reputation Points: 14
Solved Threads: 0
 

simplest sequence (not recommended for large files) without error checking

read filename(s).
open file with given name for read-only
read entire file into buffer
close input file
open file for output as write-only
write buffer from the end one byte at a time
close output file

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You