Question: Write a C or C++ program that takes a subtitle fle(a file with .srt extension) and a signed number (in milliseconds) as its inputs and

Write a C or C++ program that takes a subtitle fle(a file with .srt extension) and a signed number (in milliseconds) as its inputs and add/subtract that amount of time from all of the content of the file and store the modified file. For example, consider the following small part of a subtitle from the big bang theory:

1

00:00:03,258 --> 00:00:05,078

Ooh, it's freezing

out here.

2

00:00:05,587 --> 00:00:07,877

Would you like me to...

heat things up?

3

00:00:07,963 --> 00:00:11,056

No, I want to get in the hot tub

before I lose a toe.

4

00:00:12,306 --> 00:00:14,351

Oh. That is bright!

5

00:00:14,436 --> 00:00:16,915

Yeah, a new neighbor

put in floodlights.

6

00:00:17,001 --> 00:00:18,251

Huh.

7

00:00:18,373 --> 00:00:19,798

So, shall we?

8

00:00:20,790 --> 00:00:24,183

No. I don't want to take my

robe off under a spotlight.

9

00:00:24,376 --> 00:00:26,329

This is a candle body.

The first text will appear at 00:00:03,258 till 00:00:05,078. it is very annoying if it is not synced with the movie. Your code moves all of the time forward or backward according to the number of milliseconds that the user specified.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!