Advertisement
Guest User

Untitled

a guest
Oct 4th, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream> // dodawanie bibliotek
  2. #include <windows.h>
  3. #include <commctrl.h>
  4. #include <conio.h>
  5. using namespace std;
  6. int main ()
  7. {
  8.     InitCommonControls(); // różne czary, których i tak nikt nie zrozumie...
  9.     OSVERSIONINFO osvi;
  10.     ZeroMemory( & osvi, sizeof( OSVERSIONINFO ) );
  11.     osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
  12.     GetVersionEx( & osvi );
  13.    
  14.     int a = osvi.dwMajorVersion; // główny numer wersji.
  15.     int b = osvi.dwMinorVersion; // pomniejszy numer wersji.
  16.     cout << "wersja " << a << "." << b << endl; // wyświetlenie.
  17.     getch (); // oczekuje na naciśnięcie dowolnego przycisku.
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement