Besonderhede van voorbeeld: -7328177982613563321

Metadata

Author: WikiMatrix

Data

English[en]
For such compilers that do not implicitly define the _WIN32 macro, it can be specified on the compiler's command line, using -D_WIN32. #ifdef __unix__ /* __unix__ is usually defined by compilers targeting Unix systems */ # include <unistd.h> #elif defined _WIN32 /* _WIN32 is usually defined by compilers targeting 32 or 64 bit Windows systems */ # include <windows.h> #endif The example code tests if a macro __unix__ is defined.
Korean[ko]
프로그램 코드 작성 시, 임의 영역을 다양한 상황에 맞게 컴파일에서 제거할 수 있다. #ifdef __unix__ /* __unix__ is usually defined by compilers targeting Unix systems */ # include <unistd.h> #elif defined _WIN32 /* _Win32 is usually defined by compilers targeting 32 or 64 bit Windows systems */ # include <windows.h> #endif 이 경우 OS가 UNIX 또는 윈도 환경에 따라 다른 파일을 포함 시킬 수 있다. __unix__가 정의되어 있다면, unistd.h 파일을 첨부하고 그렇지 않고 _WIN32가 정의되어 있다면 windows.h 파일을 첨부한다. __unix__나 _WIN32의 정의는 다양한 방식으로 정의 할 수 있다.

History

Your action: