?? make_together.cpp
字號:
/******************************************************************************************
* 輔助文件,用來將指定的文件寫入映象文件的指定位置中
* 編寫:謝煜波
* email:xieyubo@126.com
* 使用方法
* make_togethger 映象文件名 位置 欲寫入的文件名
*******************************************************************************************/
#include <fstream>
#include <cstdlib>
#include <iostream>
using namespace std ;
int main( int argc , char** argv )
{
char ch ;
unsigned int count = 0 ;
if( argc == 1 ){
cout << "make_together object_file position source_file" ;
}
else{
unsigned int pos = atoi( argv[ 2 ] ) ;
ofstream outfile( argv[ 1 ] , ios_base::in | ios_base::out ) ;
outfile.seekp( pos ) ;
ifstream infile( argv[ 3 ] ) ;
while( infile.get( ch ) ){
outfile.put( ch ) ;
}
infile.close() ;
outfile.close() ;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -