From 3f4c1aba8762ce413ed1cdf861f0f5134a058301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9E=A5=EC=9B=90?= <wkddnjs3268@ajou.ac.kr> Date: Sun, 9 Aug 2020 10:37:59 +0900 Subject: [PATCH] C Preprocessor, Multiple file compile --- 8.5/README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/8.5/README.md b/8.5/README.md index 819e384..f27414c 100644 --- a/8.5/README.md +++ b/8.5/README.md @@ -44,37 +44,37 @@ b = f(20+13) // b = 1089 ### etc. -* `#pragma once` -#pragma once를 사용하여 여러번 include하는 것을 방지할 수 있다. +* #pragma once +`#pragma once`를 사용하여 여러번 include하는 것을 방지할 수 있다. -* Token stringification -`#define <identifier>(<parameter>) #parameter` +* Token stringification +`#define <identifier>(<parameter>) #parameter` #연산자는 token을 문자열 상수로 변환한다. -* Token concatenation -`#define <identifier>(<parameter>) parameter##string` +* Token concatenation +`#define <identifier>(<parameter>) parameter##string` ##연산자는 두 token을 하나로 연결하여 변환한다. -* Debuging macros +* Debuging macros 디버깅을 하면서 어느 부분에서 에러가 났는 지 알려준다. - * __FILE\_\_ + * __FILE\_\_ 에러가 발생한 파일 경로 - * __LINE\_\_ + * __LINE\_\_ 에러가 발생한 라인 - * __FUNCTION\_\_ + * __FUNCTION\_\_ 에러가 발생한 함수 # Multiple file compile * func.h -```c +``` #define SQAURE(a) ((a)*(a)) extern int func(int a); ``` * func.c -```c +``` #include "func.h" int func(int a) @@ -84,7 +84,7 @@ int func(int a) ``` * main.c -```c +``` #include <stdio.h> #include "func.h" -- GitLab