I've tried just about everything.
Can anyone give me some help.
azjherben
0
Light Poster
Recommended Answers
Jump to PostSteps
- Open original file for input, in binary mode std::binary as second parameter
- Open output file for writing in binary mode
- Create an unsigned char array for i/o
- In loop call ifstream's read() method to read , then write the buffer using ofstream's write() method, until end-of-file.
- Close both …
Jump to Postyou have to seek to the end of the file before calling tellg(). When the file is opened the file pointer is at the beginning of the file, not the end.
Jump to PostI have a question regarding coping of files:-
Is there any difference between Ancient Dragon's style of coping each byte at a time by looping through till EOF and azjherben's style of coping in one shot? I mean to ask about efficiency and all.
I think azjherben's would …
All 9 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
azjherben
0
Light Poster
azjherben
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Luckychap
68
Posting Pro in Training
azjherben
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Luckychap
commented:
Well explained
+3
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Luckychap
68
Posting Pro in Training
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.