原始碼檔案複製工具 for ACMer

2021-06-07 03:58:42 字數 2104 閱讀 5105

介於每次在oj上做完一題要手動複製貼上儲存乙份原始檔,所以自己寫了乙個簡單的工具代替手動操作,現與大家分享。

1、提供原始檔複製到指定目錄的功能;

2、在檔案目標檔案開始部分加了檔案資訊,如下:

/*-------------------------------*/

/* problem: poj 1742

/* author: zz_zigzag

/* date: 2012/05/21 20:58:09

/*-------------------------------*/

3、生成乙個record檔案記錄檔案列表資訊,如下格式:

problem id: 3823           	date: 2012/05/18 21:11:13	filelength: 1030b

problem id: lightoj 1214 date: 2012/05/19 15:14:48 filelength: 449b

problem id: lightoj 1112 date: 2012/05/19 15:42:57 filelength: 1903b

problem id: lightoj 1136 date: 2012/05/19 16:02:26 filelength: 677b

problem id: dlut 1167 date: 2012/05/21 14:21:04 filelength: 1089b

problem id: lightoj 1292 date: 2012/05/21 15:11:38 filelength: 764b

1、之前需要手動在c:\program files\makesourcefile\下建立configure.ini檔案,

內容包括原始檔路徑、目標檔案路徑。記錄(record)檔案路徑,格式如下:

sourcefilepath=c:\c\test\main.c

destinationfilepaht=c:\users\zz_zigzag\dropbox\my c\hdu\

recordfilepaht=c:\users\zz_zigzag\dropbox\my c\hdu\record.cpp

2、執行時提示輸入題目名稱,此時需要輸入欲儲存的完整檔名稱(帶副檔名) 。

讀者可根據自己需要自行修改:

#include #include #include #include const int m=10000,n=100;

char a[m],filename[n];

int filelength;

tm *local;

time_t t;

char sourcefilepath[n],destinationfilepath[n],recordfilepath[n];

void get(char a,file *f)

void readconfigure()

void output()

}/******add remarks******/

t=time(null);

local=localtime(&t);

puts("/*-------------------------------*/");

printf("/* problem: %s\n",filename);

puts("/* author: zz_zigzag");

printf("/* date: %4d/%02d/%02d %02d:%02d:%02d\n",local->tm_year+1900,\

local->tm_mon+1,local->tm_mday, local->tm_hour,local->tm_min,local->tm_sec);

puts("/*-------------------------------*/");

printf("\n");

/**********************/

while(gets(a)!=null)

}void record()

int main()

組合語言 檔案複製原始碼

這篇是乙個複製檔案的匯程式設計序,它的作用是將當前目錄下的乙個檔案的內容複製到另乙個檔案中。這個程式有以下幾點需要注意的地方 下面給出源 dseg segment errmsg db error cannot open file input1 db source file input2 db des...

《原始碼閱讀》原始碼閱讀技巧,原始碼閱讀工具

檢視某個類的完整繼承關係 選中類的名稱,然後按f4 quick type hierarchy quick type hierarchy可以顯示出類的繼承結構,包括它的父類和子類 supertype hierarchy supertype hierarchy可以顯示出類的繼承和實現結構,包括它的父類和...

原始碼控制工具

cvs,svn,git git使用多個分布式儲存庫,基於改變集進行歷史跟蹤。步驟 安裝,建立git儲存庫,向庫中新增內容,操作庫中檔案,合併,其他。gnu linux環境程式設計一書 gnuplot古老但流行的視覺化程式,可與ruby,python,smalltalk繫結。pause會把程序掛起,直...