We can detect EOL format from windows to Linux in C++
Follow the steps listed down below:
Open file in binary mode
Then, find first '\n' byte
Now, check if byte before found one equals '\r'
But there isn't such functionality in the standard library which is available.