Filename : BinaryFileIO.cpp
Author : Pawan Pillai
Description : A C++ program to read/write files in binary mode.
The user itself specifies the number of bytes to be read,
and the code runs a loop until the whole file is copied
at the destination.
1) uses loop to read andd write the bytes, thus clears the concept of reading files when file size is large.
2) shows the use of funtion gcount() whose implementation is missing in most of the tutorials.
3) the user can alter the value of variable "num_of_bytes", thus a value larger than the size of the file can also be used for experimenting purposes.
4) highly commented code, thus clarifies everything in the code.
the name "umg.rar" is the name of input file, it should be changed to the user specific filename, also the path for sorce file and destination files should also be changed as per requirement.
This is my first code which i am publishing online, just because i thought there are almost no code available online to demonstrate file copy in binary taking a loop. (if there are, then i am sorry).
I hope you like the code.