전처리기 지시문
-
전처리기 지시문(Preprocessor directives) - 3프로그래밍 언어/C & C++ 2020. 6. 28. 18:36
분량이 많아져서 세번째 글까지 나눠서 나머지 지시문에 대해 설명합니다 전처리기 지시문에는 아래와 같은 종류가 있습니다. - Macro definitions (#define #undef) - Conditional inclusions (#ifdef #ifndef #if #endif #else #elif) - Line control(#line) - Error directive(#error) - Source file inclusion(#include) - pragma directive(#pragma) * predefined macro names( __something__) 6. pragma directive(#pragma) -#pragma pragma는 컴파일러에 다양한 옵션을 설정하기 위해 사용됩니다. 이 옵..
-
전처리기 지시문(Preprocessor directives) - 2프로그래밍 언어/C & C++ 2020. 6. 27. 22:26
첫번째 글에 이어서 나머지 지시문에 대해 설명합니다 전처리 지시문에는 아래와 같은 종류가 있습니다. - Macro definitions (#define #undef) - Conditional inclusions (#ifdef #ifndef #if #endif #else #elif) - Line control(#line) - Error directive(#error) - Source file inclusion(#include) - pragma directive(#pragma) * predefined macro names( __something__) 3. Line Control(#line) -#line 보통 컴파일시 에러가 나게되면, 해당 소스 코드의 이름과 라인 넘버를 컴파일러에서 에러메시지로 줍니다. 이..