원본 주소는
http://msdn.microsoft.com/ko-kr/library/d9x1s805(en-us,VS.80).aspx
Each implementation of C and C++ supports some features unique to its host machine or operating system. Some programs, for instance, need to exercise precise control over the memory areas where data is placed or to control the way certain functions receive parameters. The #pragma directives offer a way for each compiler to offer machine- and operating system-specific features while retaining overall compatibility with the C and C++ languages. Pragmas are machine- or operating system-specific by definition, and are usually different for every compiler.
Pragmas can be used in conditional statements, to provide new preprocessor functionality, or to provide implementation-defined information to the compiler. The Microsoft C and C++ compilers recognize the following pragmas:
1. Supported only by the C++ compiler.
The token-string is a series of characters that gives a specific compiler instruction and arguments, if any. The number sign (#) must be the first non-white-space character on the line containing the pragma; white-space characters can separate the number sign and the word pragma. Following #pragma, write any text that the translator can parse as preprocessing tokens. The argument to #pragma is subject to macro expansion.
If the compiler finds a pragma it does not recognize, it issues a warning, but compilation continues.
Some pragmas provide the same functionality as compiler options. When a pragma is encountered in source code, it overrides the behavior specified by the compiler option. For example, if you specified /Zp8, you can override this compiler setting for specific portions of the code with pack:
'프로그래밍' 카테고리의 다른 글
C# worker 스레드에서 UI 스레드 Dispatcher 이용하기. (0) | 2011.06.23 |
---|---|
VS2010 커맨드 라인 시스템 환경변수 요약 (0) | 2011.05.09 |
VS 2005 편집창 검정톤 색상 스키마. (0) | 2009.07.14 |
VB6 이나 VBA 윈도우에서 휠이 안먹는 경우 (0) | 2009.07.14 |
Windows SDK 프로젝트에서 ActiveX Control 사용하기 (0) | 2009.06.26 |