#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#pragma warning(disable:4996)
FILE *fp = NULL;
static void read_file_ex(const char *file_name)
{
char *line=NULL;
char *p_pos = NULL;
fp = fopen(file_name, "wb");
if (!fp){return;}
while (!eof(fp))
{
fgets(line, 1023, fp);
if (!line && (p_pos = strstr(line,"")) != NULL)
{}
}
}
static void read_file()
{
char *qp_value[4] = { "24", "29", "34", "39" };
char *video_name[4] = { "name1", "name2", "name3", "name4" };
char name[1024] = { 0 };
for (int i = 0; i < 4; i++)
{// four video sequence
for (int j = 0; j < 4; j++)
{// four qp value
strcat(name, video_name[i]);
strcat(name, "_off_");
strcat(name, qp_value[j]);
read_file_ex(name);
memset(name, 0, sizeof(name));
}
}
}
int main()
{
read_file();
system("pause");
return 0;
}