File Split 1.0
main.cpp 1 #include <iostream> 2 #include <fstream> 3 #include <stdlib.h> 4 #include <string> 5 #include <windows.h> 6 7 using namespace std; 8 9 int main ( int argc, char* argv[] ) { 10 if ( argc != 4 && argc != 5 ) { 11 cout << "File Split 1.0" << endl; 12 cout << " Usage: fs <source file> <off begin> <off end> [<destination file>]" << endl; 13 cout << " e.g. fs app.exe 0 127 0_127.dat" << endl; 14 cout << " e.g. fs app.exe 0 127" << endl; 15 return -1; 16 } 17 fstream src ( argv[1], ios::in | ios::binary | ios::ate ); 18 if ( src.is_open() ) { 19 long long srcSize = static_cast<long long> (