본문 바로가기

공부/C언어

30. 조건부 컴파일

반응형
#include <stdio.h>

# define DEBUG

void main(void)
{
#ifdef DEBUG
	printf("Debuging\r\n");
#else
	printf("else\n");
#endif // DEBUG

	printf("testing\r\n");

}

#include <stdio.h>

# define DEBUG1

void main(void)
{
#ifdef DEBUG
	printf("Debuging\r\n");
#else
	printf("else\n");
#endif // DEBUG

	printf("testing\r\n");

}

반응형

'공부 > C언어' 카테고리의 다른 글

32. 일반, continue, break 비교  (0) 2023.03.09
31. 배열을 서브에서 서브로 전달하기  (0) 2022.03.31
29. union 메모리 분할 하기  (0) 2021.07.13
Visual studio 콘솔 창 유지 하기  (0) 2021.07.13
28. CRC-16 예제  (0) 2020.04.20