how to check os version

C++
ver && cat /etc/os-release #Show Windows and Unix version respectively
Source

Also in C++: