<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Overloading on Cheat Sheet</title><link>/kr/tags/overloading/</link><description>Recent content in Overloading on Cheat Sheet</description><generator>Hugo</generator><language>kr</language><atom:link href="/kr/tags/overloading/index.xml" rel="self" type="application/rss+xml"/><item><title>Functions</title><link>/kr/programming/cpp/primer/functions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/kr/programming/cpp/primer/functions/</guid><description>&lt;h1 id="functions"&gt;Functions&lt;a class="anchor" href="#functions"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;em&gt;C++ Primer, 5th ed.&lt;/em&gt; 6장 (Functions)을 바탕으로 정리한다.&lt;/p&gt;
&lt;p&gt;함수(Function)는 이름을 가진 코드 블록이다. 함수는 오버로딩(Overloaded)될 수 있으며, 이는 동일한 이름이 서로 다른 여러 함수를 가리킬 수 있음을 의미한다.&lt;/p&gt;
&lt;h2 id="1-객체의-수명과-함수-선언"&gt;1. 객체의 수명과 함수 선언&lt;a class="anchor" href="#1-%ea%b0%9d%ec%b2%b4%ec%9d%98-%ec%88%98%eb%aa%85%ea%b3%bc-%ed%95%a8%ec%88%98-%ec%84%a0%ec%96%b8"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="자동-객체-automatic-object"&gt;자동 객체 (Automatic Object)&lt;a class="anchor" href="#%ec%9e%90%eb%8f%99-%ea%b0%9d%ec%b2%b4-automatic-object"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;블록의 실행 중에만 존재하는 객체를 자동 객체라고 한다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;매개변수(parameter)는 자동 객체다.&lt;/strong&gt; 함수가 호출될 때 생성(초기화)되고, 함수가 종료되면 블록을 벗어나면서 자동으로 소멸한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="로컬-static-객체-local-static-object"&gt;로컬 &lt;code&gt;static&lt;/code&gt; 객체 (Local &lt;code&gt;static&lt;/code&gt; Object)&lt;a class="anchor" href="#%eb%a1%9c%ec%bb%ac-static-%ea%b0%9d%ec%b2%b4-local-static-object"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;각 로컬 &lt;code&gt;static&lt;/code&gt; 객체는 실행 흐름이 해당 객체의 정의를 처음 통과하기 전에 초기화된다.&lt;/p&gt;</description></item></channel></rss>