Skip to Content
우아한 C언어 코딩 패턴
book

우아한 C언어 코딩 패턴

by Christoper Preschem, 정기훈(Jung Ki Hun)
April 2024
Beginner to intermediate
364 pages
7h 2m
Korean
Insight
Content preview from 우아한 C언어 코딩 패턴
Fluent
274
󻱴󽴔󽴔󽴔󻺏󻫴󽴔󼖗󼉫
󻮟󻱟󽴔󼧓󺹻󻃇󼞿󻋛
󼎷󼘜󻝳󼞇
#ifdef
문을 사용하여 코드에서 변형을 구현했고, 이러한 변형을 처리하는 프
리미티브 분리를 적용하기 위해 변형을 별도의 함수에 넣었다. 이 프리미티브
는 변형을 메인 프로그램 흐름에서 분리하여 메인 프로그램을 잘 구조화하고
이해하기 쉽게 만든다.
󻀇󻳫
󺼣󻱇󽴔󼧓󺴫󺋇󺱷󻪟󻗫󽴔󼬇󼉫󼨧󺆯󽴔󻆏󼫤󻱃󽴔󼢻󼨷󺣫󽴔󻱃󽴔󼨷󻛧󺝣󽴔󻪻󻳓󼱗󽴔󻱃󼩃󼨧󺋿󽴔󻪃󺴄󺞳󺼣󻱇󽴔󼧓
󺴫󺋇󺱷󻪟󻗫󽴔󻳫󺄿󼨫󽴔󻫷󺃥󽴔󻇄󻱰󼨫
#ifdef
󼐣󺦫󺹋󽴔󺽷󺤟󽴔󻱃󽴔󼨷󻛧󻪟󽴔󺗲󻪃󽴔󻅓󺴇󺋿󽴔󺨛󻀇󻱃󺞳
처리해야 할 변형이 많아지면 단일 함수에서 모든 종류의 변형을 처리하기
어려워진다. 예를 들어 단일 함수가
#ifdef
문을 사용하여 서로 다른 하드웨어
유형과 운영 체제를 구별하는 경우, 운영 체제 변형 하나를 추가하는 순간 해
당되는 모든 하드웨어 변형도 추가해야 하므로 작업이 어려워진다. 각 변형을
더 이상 한 곳에서 처리할 수 없다. 그 대신 다양한 변형의 수만큼 필요한 노력
은 늘어난다. 이게 문제점이다. 코드의 한 곳에서 새로운 변형을 쉽게 추가할
수 있어야 한다.
󻙣󺶷󻘧
󼧓󺹻󻃇󼞿󻋛󺹋󽴔󻮟󻱟󺴫󽴔󺺛󺦳󻪃󻩋󽴔󼨫󺞳󻹘󼨷󻛧󻆓󺴫󽴔󻳤󼬤󼱗󽴔󼨫󽴔󻵔󺸧󻰧󽴔󻆏󼫤󺺛󽴔󼅧󺹻󼨫󺞳󻪻
󺲻󽴔󻵔󺸧󻰧󽴔󻆏󼫤󻫗󻮃󻫐󽴔󼆃󻳫󽴔󻆏󼫤󽴔󻃞󽴔󼨧󺦫󻮷󻪃󽴔󻆏󼫤󻰓󽴔󼅧󺹻󼨧󺝣󽴔󺆌󻭿󽴔󺃐󺃐󽴔󻆓󺢓󻰧󽴔󼨷󻛧
󺹋󽴔󺤣󺞳
이러한 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

AI를 위한 필수 수학

AI를 위한 필수 수학

할라 넬슨
파이썬으로 살펴보는 아키텍처 패턴

파이썬으로 살펴보는 아키텍처 패턴

오현석, 해리 퍼시벌, 밥 그레고리
개발 7년차, 매니저 1일차

개발 7년차, 매니저 1일차

권원상, 한민주, 카미유 푸르니에
클라우드 네이티브 애플리케이션 디자인 패턴

클라우드 네이티브 애플리케이션 디자인 패턴

카순 인드라시리, 스리스칸다라자 수호티얀

Publisher Resources

ISBN: 9788966264742