<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      PEACE

      和平

      管理

       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> ( src.tellg() );
      20         cout << "<source file> size: " << srcSize << " bytes" << "." << endl;
      21         long lgBegin = strtol ( argv[2], NULL, 10 );
      22         long lgEnd = strtol ( argv[3], NULL, 10 );
      23         std::ios_base::seekdir offBegin = static_cast<std::ios_base::seekdir> ( lgBegin );
      24         std::ios_base::seekdir offEnd = static_cast<std::ios_base::seekdir> ( lgEnd );
      25         if ( offBegin >= 0 && offEnd < srcSize && offBegin <= offEnd ) {
      26             string dstPath = "";
      27             if ( argc == 5 ) {
      28                 dstPath += argv[4];
      29             } else {
      30                 char buf[32];
      31                 dstPath += ltoa ( lgBegin, buf, 10 );
      32                 dstPath += "_";
      33                 dstPath += ltoa ( lgEnd, buf, 10 );
      34                 dstPath += ".bin";
      35             }
      36             cout << "Offsets with " << offBegin << " ~ " << offEnd << "." << endl;
      37             fstream dst ( dstPath.c_str(), ios::out | ios::binary | ios::trunc );
      38             if ( dst.is_open() ) {
      39                 src.seekg ( offBegin );
      40                 for ( int i = offBegin; i <= offEnd; i++ ) {
      41                     dst.put ( src.get() );
      42                 }
      43                 dst.flush();
      44                 dst.close();
      45                 src.close();
      46                 cout << "<destination file> expected size: " << offEnd - offBegin + 1 << " bytes" << "." << endl;
      47                 fstream chk ( dstPath.c_str(), ios::in | ios::binary | ios::ate );
      48                 if ( chk.is_open() ) {
      49                     long long chkSize = static_cast<long long> ( chk.tellg() );
      50                     chk.close();
      51                     cout << "<destination file> actual size: " << chkSize << " bytes" << "." << endl;
      52                     cout << "<destination file> state " << ( chkSize != offEnd - offBegin + 1 ? "bad" : "good" ) << "." << endl;
      53                 } else {
      54                     cout << "Can not open <destination file> file." << endl;
      55                     return -1;
      56                 }
      57                 cout << "File split completed." << endl;
      58                 return 0;
      59             } else {
      60                 src.close();
      61                 cout << "Can not create <destination file> file." << endl;
      62                 return -1;
      63             }
      64         } else {
      65             src.close();
      66             cout << "Invalid offsets. The allowed offsets is 0 ~ " << srcSize - 1 << "." << endl;
      67             return -1;
      68         }
      69     } else {
      70         cout << "Can not open <source file> file." << endl;
      71         return -1;
      72     }
      73 }

      附件1

      posted on 2019-06-11 13:57  EG2CN  閱讀(325)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 奇米四色7777中文字幕| 国产一区二区日韩在线| 国产精品乱码人妻一区二区三区| 少妇高潮喷水正在播放| 人人澡人人透人人爽| 四虎成人精品永久免费av| 亚洲日韩中文字幕在线播放| 成人福利一区二区视频在线| 老熟女重囗味hdxx69| 四虎国产精品成人| 国产在线不卡精品网站| 久久国产精品老人性| 国产精品99久久免费| 韩国无码AV片午夜福利| 日本一区二区精品色超碰| 日本一区二区三深夜不卡| 无码av中文字幕免费放| 亚洲人妻精品一区二区| 久久精品人成免费| 国产精品午夜福利小视频| 无码福利写真片视频在线播放| 激情国产一区二区三区四区| 国产精品一区二区三区三级| 国产色a在线观看| 日夜啪啪一区二区三区| 国产乱老熟女乱老熟女视频| 久久精品蜜芽亚洲国产av| 欧美日韩中文字幕久久伊人| 亚洲男人av天堂久久资源| 午夜福利理论片高清在线| 无码人妻精品一区二区三区蜜桃 | 青草99在线免费观看| 亚洲愉拍一区二区三区| AV毛片无码中文字幕不卡| 蜜芽久久人人超碰爱香蕉| 久久精品国产亚洲综合av| 亚洲免费成人av一区| 虎白女粉嫩尤物福利视频| 成人免费A级毛片无码网站入口 | 美女视频黄频大全视频| 国产av午夜精品福利|