资源简介
里面都有使用说明 代码都有 还有注释 满齐全的

代码片段和文件信息
#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);//返回的是字符变量 比较时要变换成整数变量
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输入所要调节的时间 正值是将字幕延后 负值将字幕提前(单位:毫秒)\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
相关资源
- 单片机做的6位时分秒数字钟
- vtk QT做的三维地质可视化系统2of2
- 用DIO 做的I2C程式
- 我做的电子琴,21个音,一般歌曲基本
- PB做的托盘程序(最小化后在左下角显
- 怎样在flex的datagrid中运用checkbox
- 28335写的用spi读取传感器数据并用CA
- 用C 实现的对网络上的ARP数据包进行
- 数据结构用C 写的停车场系统源代码
- 使用C 实现的教学计划安排检验程序
- Delphi做的用于分析Pascal语言的词法分
- c 做的漂亮菜单附有源代码
- PB做的俄罗斯方块
- LABVIEW做的蓝牙数据发送程序.vi
- 使用Contur在B-L轨距模型上的LHC约束
- 嵌入式Linux下利用cups驱动HP1010打印机
- 自己做的一个简单GUI扑克纸牌识别-
- 用NetBeans做的图书管理系统
- MVC做的小说管理系统
- flash做的飞机大战小游戏
- 树莓派运用CV摄像头、视觉巡线.zip
- 扑克牌游戏 flash做的
- Direct3d做的演示程序有源代码
- 使用Cadence layout布局布线常见问题详解
- 使用单片机做的18650智能充电器(程序
- 基于swift结合uiview做的一个app
- QT使用Cypress FX3 USB库代码
- 一个用C写很不错的GPRS的PDU编码程序
- 用CRSC软件进行8度半3类场地框架柱配
- 用c编程实现gps卫星坐标的计算
评论
共有 条评论