Okay guys copying and pasting video file with hex editor or with notepad++ hex editor plugin works totally fine.Now,i want to find the number of lines in a video file-
first)I opened the video file in notepad++ and the number of total lines is 1876(the left most column).
Second)I view the file in hex mode the total number of lines is 39240;
Thirdly)I built a c++ program for reading the number of lines from the same video file.My code is:
char c;
int total_line=0;
ifstream file("vid.avi",ios::binary | ios::in)
while(!file.eof())
{
c=file.get();
if(c=='\n')
{
total_line++;
}
}
file.close();
cout<<"Total line "<<total_line<<endl;
This gives total line of 1313.Which one is correct and whichone is false anyone help.