Efficient approach to read from a file and dump its data to other files in C++
I have a requirement that I need to split a file into multiple smaller files and I am trying to figure out what is the most efficient way to read and write to a file in C++. I tried two approaches: