資源簡介
里面都有使用說明 代碼都有 還有注釋 滿齊全的

代碼片段和文件信息
#include?
#include?
#include?
#include?
#include??
#include??
#include??
#include??
using?namespace?std;
bool?isdigital(char?*ch);
bool?findname(char?*objectchar?*file);
void?FileList(char?*?path);
char?*copy(char*?s);
int?en1cn2(char?*s);
char*?istime(char?*s);//返回的是字符變量?比較時要變換成整數(shù)變量
bool?alldigit(char?*s);
char*?istime2(char?*s);
char*?add(char*?timeint?add);
char*?minus(char*?timeint?minus);
int?location[]={01346710};
char?*srt1*srt2;//空間到查找到再開,沒找到就默認為NULL
//char?*srt1=(char*)malloc(400)*srt2=(char*)malloc(400);?
char*?combine(char*?s1char*?s2);
int?main()
{
FILE?*infilecn*infileen*outfile;
char?s[200]s_cn[200];
char?r[200]r_cn[200];
char*?time_en;
char*?time_cn;
int?i=0line;
bool?end;
// srt1=“NULL“;srt2=“NULL“;
char?path[MAX_PATH];?
getcwd(pathsizeof(path));?
FileList(path);
// printf(“srt1===%s==\nlen?srt1====%d\n“srt1strlen(srt1));
if(srt1==NULL?&&?srt2==NULL){
return?0;
}
////////////////////////////////////時間變換////////////////////
if(srt1!=NULL?&&?srt2==NULL){
int?shift;
printf(“\n\n\n\n\n=============================================================\n輸入所要調節(jié)的時間?正值是將字幕延后?負值將字幕提前(單位:毫秒)\n================================================================\n\n\n\n\n“);
scanf(“%d“&shift);
infileen=fopen(srt1“r“);
// free(srt2);
// srt2=(char*)malloc(10);
// srt2=“new“;
// srt2[3]=‘\0‘;
// srt2=“00:00:00500?-->?00:00:00633“;
// printf(“srt2==%s\n“srt2);
// printf(“istime2===%s\n“istime2(srt2));
// printf(“%s\n“minus(istime2(srt2)-800));
// printf(“combine====%s\n“combine(istime(srt2)istime2(srt2)));
// printf(“shift===%d\n“shift);
// time1=add(istime(srt2)shift);
// printf(“time1==%s“time1);
// time2=add(istime2(s)shift);
outfile=fopen(“new.srt““w“);
printf(“shift===%d\n“shift);
if(shift>=0){
while(fgets(s200infileen)!=NULL){
if(istime(s)!=NULL){
printf(“time1====%s“istime(s));
printf(“time2====%s“istime2(s));
// printf(“combine====%s“combine(add(istime(s)shift)add(istime2(s)shift)));
fputs(combine(add(istime(s)shift)add(istime2(s)shift))outfile);
}
else{
fputs(soutfile);
}
}
}
else{
while(fgets(s200infileen)!=NULL){
if(istime(s)!=NULL){
printf(“time1====%s“istime(s));
printf(“time2====%s“istime2(s));
// printf(“combine====%s“combine(add(istime(s)shift)add(istime2(s)shift)));
fputs(combine(minus(istime(s)shift)minus(istime2(s)shift))outfile);
}
else{
fputs(soutfile);
}
}
}
fclose(infileen);
fclose(outfile);
remove(srt1);
printf(“srt1=====%s“srt1);
rename(“new.srt“srt1);
printf(“\n\n\n\n\n=================完成=================\n\n\n=========made?by?123===================\n\n\n“);
for(int?j=0;j<100000;j++){
j=
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????16166??2008-12-01?21:28??caption\caption.cpp
?????文件???????4296??2008-11-20?19:09??caption\caption.dsp
?????文件????????520??2008-11-20?17:28??caption\caption.dsw
?????文件??????41984??2008-12-01?21:38??caption\caption.ncb
?????文件??????53760??2008-12-01?21:38??caption\caption.opt
?????文件????????248??2008-12-01?21:33??caption\caption.plg
?????文件?????299061??2008-12-01?21:29??caption\Debug\caption.exe
?????文件?????421620??2008-12-01?21:29??caption\Debug\caption.ilk
?????文件??????73566??2008-12-01?21:28??caption\Debug\caption.obj
?????文件??????43520??2008-11-20?17:41??caption\Debug\caption.opt
?????文件?????229596??2008-11-20?17:28??caption\Debug\caption.pch
?????文件?????656384??2008-12-01?21:29??caption\Debug\caption.pdb
?????文件????????235??2008-11-25?19:53??caption\Debug\cn.srt
?????文件?????181248??2008-12-01?21:33??caption\Debug\vc60.idb
?????文件?????135168??2008-12-01?21:28??caption\Debug\vc60.pdb
?????文件????????692??2008-12-01?21:33??caption\en+cn.srt
?????文件????????312??2008-12-01?20:20??caption\prison.break..en.srt
?????文件????????265??2008-12-01?20:20??caption\prison.break.s02e11.hdtv.xvid-xor.gb.srt
?????目錄??????????0??2008-11-20?17:28??caption\Debug
?????目錄??????????0??2008-11-20?17:27??caption
-----------?---------??----------?-----??----
??????????????2158641????????????????????20
評論
共有 條評論