M
M
MikioSi2021-12-11 17:29:19
css
MikioSi, 2021-12-11 17:29:19

How to make the video added to the folder automatically added to the html site?

I want that when I move a video to a certain folder, the video is immediately uploaded to the site and displayed. Like YouTube.
Or make it so that you can upload the video to the site through the site itself.
And all this with the help of html, java, css
I want to make a personal YouTube

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ruchkin, 2015-06-23
@VoidEx

in.seekg (ios::end);
To read the last character, you must stand not at the end, but one character earlier. In your case, there is nothing to read.
This will only take you back one character you just read.
If the files are small, it will be easier to read it all into a std::vector, and then just copy it to the output file:

std::vector<char> cts;
in.seekg(0, in.end);
cts.resize(in.tellg());
in.seekg(0, in.beg);

in.read(&ctr[0], ctr.size());

std::ostream_iterator<char> out_it(out);
std::copy(cts.rbegin(), cts.rend(), out);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question