C/문법
헤더 파일 만들기
1. 헤더 파일 만들기 같은 폴더위치에 - dev는ctrl+B = 현재 작업 폴더 위치 열기. 2. 헤더 파일 확인 # include void print_hello(); void bye(); void print_hello() { printf("Hello header \n"); } void print_bye() { printf("Bye header \n"); } 3. main.c 에서 header파일 include # include "function_print.h" // 헤더 파일 가져오기. int main() { print_hello(); print_bye(); print_hello(); print_bye(); } **간단하게 정리 1. c파일 1개 생성 2. header파일 선언만 남기고 코드 옮기기
2020. 7. 28. 19:59
최근댓글