You need to start filling your program with a load of couts, so you can find out where it's going wrong.
Just as a side note, you may need to read and write in binary mode, we'll get to that later though.
In the mean time find out if each part is doing what it should be.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
> usingnamespace std;
Whatever crappy code colouring tool you're using, stop using it and use the board code tags.
Few people are going to be bothered to trawl through unindented code which isn't even compilable, and has been corrupted in transmission.
http://www.daniweb.com/techtalkforums/announcement8-3.html
> help with encryption! asap
Your urgency isn't our problem
http://www.catb.org/~esr/faqs/smart-questions.html#urgent
As for the rest of the problem, start with a program that simply copies one file to another without any changes. If you can't manage that, then you're wasting time trying to do encryption.
Oh, and main() really does return an int. Use it or be doomed.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953