tag:blogger.com,1999:blog-63323942027759129122023-11-16T03:39:53.253+09:00Local Disk (C:)Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.comBlogger66125tag:blogger.com,1999:blog-6332394202775912912.post-3972851276659339572019-05-14T15:36:00.001+09:002021-02-10T18:57:02.762+09:00Font Awesome 사용법<p style="background-color: white; box-sizing: border-box; clear: none; color: #222222; float: none; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box;">웹사이트를 만들때 아이콘은 필수적인 요소입니다. 아이콘을 사용하면 방문자들에게 좀 더 직관적으로 기능에 대해 어필이 가능하죠. 웹사이트의 기능을 글로 설명하는것이아니라 아이콘 하나로 대체함으로써 좀 더 깔끔한 웹페이지 구축도 가능합니다. 웹사이트에 픽토그램(그림문자)을 쉽게 넣는 방법이 있습니다. 바로 웹 아이콘 폰트를 사용하는 것인데요. 웹 아이콘 폰트는 여러 종류가 있으나 그 중에서 Font Awesome가 제일 유명합니다. </span><span style="box-sizing: border-box; color: red;">Font Awesome이란 이러한 웹 아이콘 폰트를 모아놓은 라이브러리</span><span style="box-sizing: border-box;">입니다. 이번 포스팅에서는 Font Awesome의 사용법에 대해 다뤄보려 합니다.</span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><a class="tx-link" href="http://fontawesome.io/" style="box-sizing: border-box; color: #337ab7; text-decoration-line: none; transition: all 0.2s ease 0s;" target="_blank">Font Awesome 공식 사이트</a></p><div class="jb-image-p-wrap" style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin: 25px 0px; word-spacing: 0.5px;"><p style="box-sizing: border-box; clear: none; float: none; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important;"><span class="imageblock" style="box-sizing: border-box; display: inline-block; height: auto; max-width: 100%; width: 800px;"><img alt="폰트어썸" filemime="image/jpeg" filename="폰트어썸.png" height="394" original="yes" src="https://t1.daumcdn.net/cfile/tistory/99CC224D5B2CAD210C" srcset="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=http%3A%2F%2Fcfile26.uf.tistory.com%2Fimage%2F99CC224D5B2CAD210C93CF" style="border: none; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;" width="800" /></span></p></div><p style="background-color: white; box-sizing: border-box; clear: none; color: #222222; float: none; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; text-align: center; word-spacing: 0.5px;"></p><h1 id="h" style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 1.4em; line-height: 2; margin: 20px 0px; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 18pt;">Font-Awesome의 장점</span></h1><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"><b style="box-sizing: border-box;"><span style="box-sizing: border-box; color: red; font-size: 14pt;">1.</span> Html Font 속성이 모두 사용 가능하다.</b></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;">Font-Awesome은 이미지가 아닌 폰트이기 때문에 HTML의 Font-style을 적용할 수 있습니다. 이것은 굉장히 큰 장점인데요. 가령 Font-Awesome이 이미지였다고 생각해봅시다. 그럼 크기를 변경시킬때마다 이미지의 크기도 늘려야하고, 색을 변경시킬때마다 이미지의 색상도 변경해주어야 할 것입니다. 하지만 Font-Awesome은 그럴 필요가 없습니다. 간단하게 소스 몇줄만 추가해주면 크기도 늘릴 수 있고 색상도 변경할 수 있죠.</p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-lock"</span> <span class="hljs-attr" style="box-sizing: border-box;">aria-hidden</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"true"</span> <span class="hljs-attr" style="box-sizing: border-box;">style</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"color:#2353a5;font-size:100px;"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span></code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"><b style="box-sizing: border-box;"><span style="box-sizing: border-box; color: red; font-size: 14pt;">2. </span>CSS를 적용시킬 수 있다.</b></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;">Font-Awesome에는 Css를 적용시켜 웹사이트만의 고유한 스타일로 응용할 수 있습니다. 일반적으로 크기나 색상 그림자효과와 같은것을 Css로 통일시켜 사용합니다.</p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">style</span> <span class="hljs-attr" style="box-sizing: border-box;">type</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"text/css"</span>></span><span class="css" style="box-sizing: border-box;">
<span class="hljs-selector-class" style="box-sizing: border-box; color: #e8bf6a;">.pinkstyle</span>{<span class="hljs-attribute" style="box-sizing: border-box; color: #6a8759;">color</span>:<span class="hljs-number" style="box-sizing: border-box; color: #6897bb;">#f68181</span>;<span class="hljs-attribute" style="box-sizing: border-box; color: #6a8759;">font-size</span>:<span class="hljs-number" style="box-sizing: border-box; color: #6897bb;">50px</span>;}
</span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">style</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-lock pinkstyle"</span> <span class="hljs-attr" style="box-sizing: border-box;">aria-hidden</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"true"</span> ></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span></code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"><b style="box-sizing: border-box;"><span style="box-sizing: border-box; color: red; font-size: 14pt;">3. </span>브라우저 호환성 문제가 적다.</b></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;">웹사이트를 제작할때 가장 신경쓰이는 부분이 Crome에서는 돌아가는데 Explorer에서는 안되고 이런 웹 브라우저 호환성 문제가 상당히 짜증납니다. 하지만 Font-Awesome은 자바스크립트가 사용되지 않기때문에 이런 호환성문제가 거의 없습니다.</p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"><b style="box-sizing: border-box;"><span style="box-sizing: border-box; color: red; font-size: 14pt;">4. </span>무료 아이콘이 많다.</b></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;">Font-Awesome에는 상당히 많은 무료 아이콘이 있습니다. 유료인것도 있지만 워낙 무료 아이콘의 갯수가 많기때문에 유료결제 하시는분은 거의 없으실거에요. 아이콘 배포목적이 아니라면 상업적인 용도로도 활용하실 수 있으니 홈페이지를 제작하면서 무료아이콘 이미지를 찾아다니는 수고를 줄일 수 있습니다.</p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"><b style="box-sizing: border-box;"><span style="box-sizing: border-box; color: red; font-size: 14pt;">5. </span>원하는 아이콘을 찾기가 수월하다.</b></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;">원하는 아이콘 찾는 과정이 간단합니다. 기존의 픽토그램 사이트에가서 자신이 원하는 아이콘을 찾을 필요가 없습니다. 아래의 링크에서 검색만 해주시면 됩니다.</p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><a class="tx-link" href="http://fontawesome.io/icons/" style="box-sizing: border-box; color: #337ab7; text-decoration-line: none; transition: all 0.2s ease 0s;" target="_blank">Font-Awesome 아이콘 목록</a> </p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><br style="box-sizing: border-box;" /></p><h1 id="h_1" style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 1.4em; line-height: 2; margin: 20px 0px; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 18pt;">Font-Awesome 사용법</span></h1><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 10pt;"><span style="box-sizing: border-box; font-size: 11pt;"><b style="box-sizing: border-box;"><span style="box-sizing: border-box; color: red; font-size: 12pt;">1.</span></b></span> CDN 선언</span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;">폰트 어썸을 사용하는 방법은 두가지가 있습니다. 첫번째 방법은 CDN을 삽입하고 아이콘을 특정 클래스 명으로 호출해 사용하는 방법입니다. 두번째 방법은 직접 원하는 아이콘을 다운받아 활용하는 방식이 있는데 대부분 CDN방식을 많이 사용합니다.</p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"></p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">link</span> <span class="hljs-attr" style="box-sizing: border-box;">rel</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"stylesheet"</span> <span class="hljs-attr" style="box-sizing: border-box;">href</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"</span>></span></code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><head>부분에 위의 코드를 삽입시켜줍니다. 버전은 상이할 수 있습니다.</p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box;"><b style="box-sizing: border-box;"><br style="box-sizing: border-box;" /></b></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><b style="box-sizing: border-box; font-size: 14.6667px;"><span style="box-sizing: border-box; color: red; font-size: 12pt;">2. </span></b>아이콘 출력</p><p><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><span class="fa fa-camera fa-3x" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"></span><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /></p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-camera"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span> </code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"><b style="box-sizing: border-box;"><br style="box-sizing: border-box;" /></b></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; line-height: 2; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><b style="box-sizing: border-box; font-size: 14.6667px;"><span style="box-sizing: border-box; color: red; font-size: 12pt;">3. </span></b>아이콘 색상 변경</p><p><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><span style="background-color: white; box-sizing: border-box; color: blue; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"><span class="fa fa-camera fa-3x" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto;"></span></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><br style="box-sizing: border-box;" /></p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span> <span class="hljs-attr" style="box-sizing: border-box;">style</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"color:blue"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-camera fa-5x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span>></span></code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"> </span><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"><b style="box-sizing: border-box;"><br style="box-sizing: border-box;" /></b></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><b style="box-sizing: border-box; font-size: 14.6667px;"><span style="box-sizing: border-box; color: red; font-size: 12pt;">4. </span></b>아이콘 크기 변경</p><p><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><span class="fa fa-camera fa-lg" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 1.33333em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 0.75em; text-rendering: auto; vertical-align: -15%; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-camera fa-2x" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 2em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-camera fa-3x" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-camera fa-4x" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 4em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-camera fa-5x" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 5em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"></span><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /></p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-camera fa-lg"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span> <span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- 33% 크기 --></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-camera fa-2x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span> <span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- 2배 크기 --></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-camera fa-3x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span> <span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- 3배 크기 --></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-camera fa-4x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span> <span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- 4배 크기 --></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-camera fa-5x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span> <span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- 5배 크기 --></span>
</code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"> </span><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"> </span><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><b style="box-sizing: border-box; font-size: 14.6667px;"><span style="box-sizing: border-box; color: red; font-size: 12pt;">5. </span></b>아이콘 테두리 적용</p><p><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><span class="fa fa-camera fa-3x fa-border" style="-webkit-font-smoothing: antialiased; background-color: white; border-radius: 0.1em; border: 0.08em solid rgb(238, 238, 238); box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; padding: 0.2em 0.25em 0.15em; text-rendering: auto; word-spacing: 0.5px;"></span><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"></p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-quote-left fa-pull-left fa-border"</span> <span class="hljs-attr" style="box-sizing: border-box;">aria-hidden</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"true"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span></code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"> </span><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"> </span><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><b style="box-sizing: border-box; font-size: 14.6667px;"><span style="box-sizing: border-box; color: red; font-size: 12pt;">6. </span></b>아이콘 방향 회전</p><p><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><span class="fa fa-shield fa-3x" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-shield fa-3x fa-rotate-90" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; filter: none; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; transform: rotate(90deg); word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-shield fa-3x fa-rotate-180" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; filter: none; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; transform: rotate(180deg); word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-shield fa-3x fa-rotate-270" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; filter: none; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; transform: rotate(270deg); word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-shield fa-3x fa-flip-horizontal" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; filter: none; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; transform: scale(-1, 1); word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-shield fa-3x fa-flip-vertical" style="-webkit-font-smoothing: antialiased; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; filter: none; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-rendering: auto; transform: scale(1, -1); word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /></p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-shield"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- normal --></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-shield fa-rotate-90"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- fa-rotate-90 --></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-shield fa-rotate-180"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- fa-rotate-180 --></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-shield fa-rotate-270"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- fa-rotate-270 --></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-shield fa-flip-horizontal"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- fa-flip-horizontal --></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-shield fa-flip-vertical"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!-- fa-flip-vertical --></span>
</code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><b style="box-sizing: border-box; font-size: 14.6667px;"><span style="box-sizing: border-box; color: red; font-size: 12pt;"><br style="box-sizing: border-box;" /></span></b></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><b style="box-sizing: border-box; font-size: 14.6667px;"><span style="box-sizing: border-box; color: red; font-size: 12pt;"><br style="box-sizing: border-box;" /></span></b></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><b style="box-sizing: border-box; font-size: 14.6667px;"><span style="box-sizing: border-box; color: red; font-size: 12pt;">7. </span></b>아이콘 회전 적용</p><p><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><span class="fa fa-spinner fa-spin fa-3x fa-fw" style="-webkit-font-smoothing: antialiased; animation: 2s linear 0s infinite normal none running fa-spin; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-align: center; text-rendering: auto; width: 1.28571em; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-circle-o-notch fa-spin fa-3x fa-fw" style="-webkit-font-smoothing: antialiased; animation: 2s linear 0s infinite normal none running fa-spin; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-align: center; text-rendering: auto; width: 1.28571em; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-refresh fa-spin fa-3x fa-fw" style="-webkit-font-smoothing: antialiased; animation: 2s linear 0s infinite normal none running fa-spin; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-align: center; text-rendering: auto; width: 1.28571em; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-cog fa-spin fa-3x fa-fw" style="-webkit-font-smoothing: antialiased; animation: 2s linear 0s infinite normal none running fa-spin; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-align: center; text-rendering: auto; width: 1.28571em; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa fa-spinner fa-pulse fa-3x fa-fw" style="-webkit-font-smoothing: antialiased; animation: 1s steps(8) 0s infinite normal none running fa-spin; background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: FontAwesome; font-size: 3em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1; text-align: center; text-rendering: auto; width: 1.28571em; word-spacing: 0.5px;"></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"></span><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /></p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-spinner fa-spin fa-fw"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-circle-o-notch fa-spin fa-fw"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-refresh fa-spin fa-fw"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-cog fa-spin fa-fw"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-spinner fa-pulse fa-fw"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
</code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"> </span><br style="box-sizing: border-box;" /></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><span style="box-sizing: border-box; font-size: 12pt;"><br style="box-sizing: border-box;" /></span></p><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><b style="box-sizing: border-box; font-size: 14.6667px;"><span style="box-sizing: border-box; color: red; font-size: 12pt;">8. </span></b>아이콘 중첩</p><p><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><span class="fa-stack fa-lg" style="background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: "Iropke Batang", sans-serif; font-size: 1.33333em; height: 2em; line-height: 2em; position: relative; vertical-align: middle; width: 2em; word-spacing: 0.5px;"><span class="fa fa-square-o fa-stack-2x" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: 2em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; left: 0px; line-height: 1; position: absolute; text-align: center; text-rendering: auto; width: 42.6562px;"></span><span class="fa fa-twitter fa-stack-1x" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; left: 0px; line-height: inherit; position: absolute; text-align: center; text-rendering: auto; width: 42.6562px;"></span></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa-stack fa-lg" style="background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: "Iropke Batang", sans-serif; font-size: 1.33333em; height: 2em; line-height: 2em; position: relative; vertical-align: middle; width: 2em; word-spacing: 0.5px;"><span class="fa fa-circle fa-stack-2x" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: 2em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; left: 0px; line-height: 1; position: absolute; text-align: center; text-rendering: auto; width: 42.6562px;"></span><span class="fa fa-flag fa-stack-1x fa-inverse" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; color: white; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; left: 0px; line-height: inherit; position: absolute; text-align: center; text-rendering: auto; width: 42.6562px;"></span></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa-stack fa-lg" style="background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: "Iropke Batang", sans-serif; font-size: 1.33333em; height: 2em; line-height: 2em; position: relative; vertical-align: middle; width: 2em; word-spacing: 0.5px;"><span class="fa fa-square fa-stack-2x" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: 2em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; left: 0px; line-height: 1; position: absolute; text-align: center; text-rendering: auto; width: 42.6562px;"></span><span class="fa fa-terminal fa-stack-1x fa-inverse" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; color: white; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; left: 0px; line-height: inherit; position: absolute; text-align: center; text-rendering: auto; width: 42.6562px;"></span></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"> </span><span class="fa-stack fa-lg" style="background-color: white; box-sizing: border-box; color: #222222; display: inline-block; font-family: "Iropke Batang", sans-serif; font-size: 1.33333em; height: 2em; line-height: 2em; position: relative; vertical-align: middle; width: 2em; word-spacing: 0.5px;"><span class="fa fa-camera fa-stack-1x" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: inherit; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; left: 0px; line-height: inherit; position: absolute; text-align: center; text-rendering: auto; width: 42.6562px;"></span><span class="fa fa-ban fa-stack-2x text-danger" style="-webkit-font-smoothing: antialiased; box-sizing: border-box; display: inline-block; font-family: FontAwesome; font-size: 2em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; left: 0px; line-height: 1; position: absolute; text-align: center; text-rendering: auto; width: 42.6562px;"></span></span><span style="background-color: white; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;"></span><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /><br style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; word-spacing: 0.5px;" /></p><pre style="background-color: white; box-sizing: border-box; color: #222222; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; font-size: 16px; margin-bottom: 20px; margin-top: 20px; overflow: auto; white-space: pre-wrap; word-spacing: 0.5px;"><code class="hljs xml" style="background: rgb(40, 43, 46); box-sizing: border-box; color: #a9b7c6; display: block; font-family: Consolas, Menlo, Monaco, "Courier New", monospace; margin: 0px; overflow-x: auto; padding: 0.5em; white-space: pre;"><span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa-stack fa-lg"</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-square-o fa-stack-2x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-twitter fa-stack-1x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!--fa-twitter on fa-square-o--></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa-stack fa-lg"</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-circle fa-stack-2x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-flag fa-stack-1x fa-inverse"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!--fa-flag on fa-circle--></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa-stack fa-lg"</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-square fa-stack-2x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-terminal fa-stack-1x fa-inverse"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!--fa-terminal on fa-square--></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa-stack fa-lg"</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-camera fa-stack-1x"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"><<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span> <span class="hljs-attr" style="box-sizing: border-box;">class</span>=<span class="hljs-string" style="box-sizing: border-box; color: #6a8759;">"fa fa-ban fa-stack-2x text-danger"</span>></span><span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">i</span>></span>
<span class="hljs-tag" style="box-sizing: border-box;"></<span class="hljs-name" style="box-sizing: border-box; color: #e8bf6a;">span</span>></span>
<span class="hljs-comment" style="box-sizing: border-box; color: grey;"><!--fa-ban on fa-camera--></span>
</code></pre><p style="background-color: white; box-sizing: border-box; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0px !important; padding-top: 0px !important; word-spacing: 0.5px;"><br style="box-sizing: border-box;" /></p><div class="container_postbtn #post_button_group" style="background-color: white; box-sizing: border-box; clear: both; color: #222222; font-family: "Iropke Batang", sans-serif; font-size: 16px; padding: 35px 0px; position: relative; word-spacing: 0.5px;"><div class="postbtn_like" style="border-radius: 16px; border: 1px solid rgba(185, 185, 185, 0.5); box-sizing: border-box; float: left; font-size: 0px !important; margin: 0px; padding: 0px 9px;"><div class="wrap_btn" id="reaction-192" style="box-sizing: border-box; float: left; margin: 0px; padding: 0px; position: relative;"><button class="btn_post uoc-icon" style="-webkit-font-smoothing: antialiased; border-color: initial; border-style: none; border-width: 0px; cursor: pointer; font-family: "Noto Sans DemiLight", AppleSDGothicNeo, "Malgun Gothic", "맑은 고딕", 돋움, dotum, sans-serif !important; font-size: 0px !important; height: 30px; line-height: 0 !important; margin: 0px; outline: none; padding-bottom: 0px; padding-top: 0px; vertical-align: middle;"></button></div></div></div>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-49680303205482964072019-03-10T18:34:00.000+09:002021-02-10T18:35:37.920+09:00HTML 특정 위치로 링크 걸기<p><span style="font-family: inherit;"> <span style="background-color: white; color: #7a7a7a;">블로그나 웹페이의 특정한 위치로 이동하는 링크를 넣는 방법은, 이동하고자 하는 위치에 이름을 붙여 지정하는 일과 그 지정한 이름이 있는 위치로 가는 링크를 거는 일 두 가지로 나누어 생각할 수 있다.</span></span></p><span style="font-family: inherit;"><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #93c47d;"><b>1) 위치 지정하기</b></span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">HTML 편집창에서, 아래와 같이 이름(name)을 붙인 <a>태그를 원하는 위치에 넣어 주면 된다.</span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;"> "~~"부분은 이동할 목표지점에 붙인 임의의 이름이며, 숫자와 알파벳으로 적어 주면 된다. 여기서는 장미꽃 그림으로 가도록 하려고 이름을 쉽게 "jangmi"라고 붙였다.</span><br style="background-color: white; color: #7a7a7a;" /></span><div style="background-color: white; border: 1px solid gold; color: #7a7a7a; padding: 10px;"><span style="font-family: inherit;"><a name="jangmi"></span></div><span style="font-family: inherit;"><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #93c47d;"><b>2) 지정한 위치로 가는 링커 걸기</b></span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">지정한 위치로 가는 링크는 두 가지를 생각할 수 있다. 하나는 링크와 같은 페이지 안의 특정한 위치로 가는 것이고, 둘은 다른 페이지 또는 다른 사이트의 특정한 페이지의 특정한 위치로 가는 것이다.</span><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: orange;"><b>(1) 같은 페이지 안에서 이동할 때</b></span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">같은 페이지 안의 특정한 위치로 가고자 할 때는 아래와 같이 <a> 태그의 이동할 위치 참조(href)에 #과 위치를 지정한 이름을 붙여 쓰면 된다.</span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">아래는 같은 페이지 안에서 이름(name)이 jangmi로 붙여진 위치로 이동하는 태그 모양이다.</span><br style="background-color: white; color: #7a7a7a;" /></span><div style="background-color: white; border: 1px solid gold; color: #7a7a7a; padding: 10px;"><span style="font-family: inherit;"><a href="#jangmi">장미 구경하세요</a></span></div><span style="font-family: inherit;"><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: orange;"><b>(2) 다른 페이지 또는 다른 사이트의 특정 페이지의 특정 위치로 이동할 때</b></span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">위의 같은 페이지 안에서 이동할 때와 다른 점은 사이트나 페이지의 주소(URL)를 함께 적어 주는 것 뿐이다.</span><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /></span><div style="background-color: white; border: 1px solid gold; color: #7a7a7a; padding: 10px;"><span style="font-family: inherit;"><a href="이동할 페이지의 주소(URL)#jangmi">장미 구경하세요</a></span></div><span style="font-family: inherit;"><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #93c47d;"><b>실제 적용한 모습</b></span><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">구글 블로그의 다이나믹 템플릿에서는 이 기능이 제대로 작동하지 않는다.</span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">구글 블로그의 다른 템플릿에서는 아래의 참고1과 같은 문제점과 해결방법이 있으므로 가능하다.</span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;"> </span><span style="background-color: white; color: #0b5394;"><a href="http://howways2.blogspot.com/2015/04/HTML-A-tag-Link-to-Go-Specific-Line-and-of-Specific-Page.html" style="background: transparent; color: #2883f3; text-decoration-line: none;" target="_blank"><b>실제 적용한 예제 페이지 보기</b> >></a></span><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #93c47d;"><b>참고1: 구글블로그에서의 주의 사항</b></span><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">구글블로그에서는 <a>태그를 넣으면, 자동으로 href="~~~" 인자가 추가 되어, 이 기능이 제대로 작동하지 않는다. 아래의 보기에서 빨강색 부분이 자동으로 추가된 부분이다.</span><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">HTML 모드와 Compose 모드 사이를 이동을 하면 자동으로 주소 인자가 들어가서 오류가 생긴다.</span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">해결 방법은, HTML 편집모드에서 태그를 넣은 다음, Compose 모드로 창을 바꾸지 말고, 그 상태에서 바로 저장후 발행을 하면 정상 작동한다.</span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">이렇게 하더라도 다이나믹뷰에서는 되지 않는다.</span><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">그리고, 위치를 지정할 때 <a name="이름"> 다음에 </a>를 붙여서 마무리 해 주어야 한다.</span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">즉, <a name="이름"></a> 와 같이 해야 한다.</span><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;"><a name="jangmi"> 태그가 아래와 같이 바뀐다.</span><br style="background-color: white; color: #7a7a7a;" /></span><div style="background-color: white; border: 1px solid gold; color: #7a7a7a; padding: 10px;"><span style="font-family: inherit;"><a <span style="color: red;">href="https://www.blogger.com/null"</span> name="jangmi"></span></div><span style="font-family: inherit;"><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;"><a href="#jangmi">장미를 보세요</a> 태그가 아래와 같이 바뀐다</span><br style="background-color: white; color: #7a7a7a;" /></span><div style="background-color: white; border: 1px solid gold; color: #7a7a7a; padding: 10px;"><span style="font-family: inherit;"><a href="<span style="color: red;">https://www.blogger.com/blogger.g?blogID=1234567890123</span>#jangmi">장미 구경하세요</a></span></div><span style="font-family: inherit;"><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #93c47d;"><b>참고 2: 구글 안내 페이지의 실제 태그 모양</b></span><br style="background-color: white; color: #7a7a7a;" /><span style="background-color: white; color: #7a7a7a;">아래는 구글의 블로그 안내 페이지에서 특정 위치로 이동하는 코드부분만 뽑은 예이니 참고 하면 도움이 되겠다.</span><br style="background-color: white; color: #7a7a7a;" /></span><div style="background-color: white; border: 1px solid gold; color: #7a7a7a; padding: 10px;"><span style="font-family: inherit;"><div class="infoSection"><br /> <h3>콘텐츠</h3><br /> <ul><br /> <li><a href="#createblog">블로그 만들기</a></li><br /> <li><a href="#dashboard">대시보드</a></li><br /> <li><a href="#overview">개요</a></li><br /> <li><a href="#write">글쓰기</a></li><br /> <li><a href="#addphotos">이미지 추가</a></li><br /> <li><a href="#addvideos">동영상 추가</a></li><br /> <li><a href="#customizelayout">맞춤설정</a></li><br /> <li><a href="#permissions">개인정보 보호 및 사용권한</a></li><br /> </ul><br /></div><br /><br /><br /><h3 class="dashboard"><a id="dashboard" name="dashboard"></a>대시보드</h3><br />~~ 내용 ~~<br /><h3 class="overview"><a id="overview" name="overview"></a>개요</h3><br />~~ 내용 ~~<br /><h3><a id="write" name="write"></a>글쓰기</h3><br />~~ 내용 ~~<br /><h3><a id="addphotos" name="addphotos"></a>이미지 추가</h3><br />~~ 내용 ~~<br /><h3><a id="addvideos" name="addvideos"></a>동영상 추가</h3><br />~~ 내용 ~~<br /><h3><a id="customizelayout" name="customizelayout"></a>맞춤설정</h3><br />~~ 내용 ~~<br /><h3><a id="permissions" name="permissions"></a>개인정보 보호 및 사용권한</h3><br />~~ 내용 ~~<br /><p><a href="#top">맨위로</a></p></span></div>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-29108099427200283422015-05-28T14:00:00.002+09:002021-02-10T18:50:35.291+09:00상속 (C++)<p> <span style="font-family: 돋움, dotum; font-size: 9pt; text-align: justify;">1. 상속에서 상위 클래스를 (기본 클래스(base class))클래스라고 하고, </span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;"> 상속받는 하위클래스를 (파생 클래스(derived class))클래스라고한다.</span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">2. 상속의 장점</span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">[1]간결한 클래스 작성</span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">기본 클래스의 기능을 물려받아 파생 클래스를 간결히 작성</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">[2]클래스 간의 계층적 분류 및 관리의 용이성</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">상속은 클래스들의 구조적 관계 파악 용이</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">[3]클래스 재사용과 확장을 통한 소프트웨어 생산성 향상</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">빠른 소프트웨어 생산 필요시, </span><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">기존에 작성한 클래스의 재사용(상속)을 이용</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">상속받아 새로운 기능을 확장</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">그러므로 앞으로 있을 상속에 대비한 클래스의 객체 지향적 설계 필요</span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">3. 상속의 종류 : public, protected, private 상속에 대해서 간략히 설명(page. 387~388)</span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">[1]private</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">선언된 클래스 내에서만 접근 가능</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">파생 클래스에서도 기본 클래스의 private 멤버 직접 접근 불가</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;"><br /></span></p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="font-family: 돋움, dotum; font-size: 9pt;"><span style="color: #333333;">[2]</span></span><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">public</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">선언된 클래스나 외부 어떤 클래스, 모든 외부 함수에 대해 접근이 허용된다</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">파생 클래스에서 기본 클래스의 public 멤버 접근이 가능함</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;"><br /></span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">[3]protected</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">선언된 클래스에서 접근 가능</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">파생 클래스에서만 접근 허용</span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">4. 업캐스팅, 다운캐스팅</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">[1]업 캐스팅(up-casting)</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">파생 클래스 포인터가 기본 클래스 포인터에 치환되는 것</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">(ex)</span><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">사람을 동물로 봄</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">[2]다운 캐스팅(down-casting)</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">기본 클래스의 포인터가 파생 클래스의 포인터에 치환되는 것</span></p><div style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; text-align: justify;"><span style="color: black; font-size: 9pt;"><br /></span></div><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">5. 상속관계에서 생성자, 소멸자 호출순서</span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;"> </span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">(1) 그림 8-14코드, 실행결과</span></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">class<span style="color: black;"> </span><span style="color: #006141;">A</span><span style="color: black;">{</span></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black;"> </span>public<span style="color: black;">:</span></p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> A(){ cout << <span style="color: #3933ff;">"생성자 A"</span> << endl; }</p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> A(<span style="color: #931a68;">int</span> x){ cout << <span style="color: #3933ff;">"매개변수생성자 A"</span> << endl; }</p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">};</p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">class<span style="color: black;"> </span><span style="color: #006141;">B</span><span style="color: black;"> : </span>public<span style="color: black;"> </span><span style="color: #006141;">A</span><span style="color: black;">{</span></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black;"> </span>public<span style="color: black;">:</span></p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> B(){ cout << <span style="color: #3933ff;">"생성자 B"</span> << endl; }</p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">};</p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">int</span> main(){</p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> <span style="color: #006141;">B</span> b;</p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #333333; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><img alt="" class="_photoImage" data-lazy-src="" height="411" id="20151201_85/sin10120_1448946139302xaVoA_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.01.21.png" src="https://postfiles.pstatic.net/20151201_85/sin10120_1448946139302xaVoA_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.01.21.png?type=w3" style="border: none; cursor: pointer;" width="550" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="198" id="20151201_250/sin10120_1448946139655QCSa2_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.01.26.png" src="https://postfiles.pstatic.net/20151201_250/sin10120_1448946139655QCSa2_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.01.26.png?type=w3" style="border: none; cursor: pointer;" width="264" /> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">(2) 그림 8-18코드, 실행결과</span></p><div align="center" class="post-view pcol2 _param(1)" id="post-view220547930205" style="clear: both; color: #333333; font-family: 돋움; font-size: 12px; line-height: 1.5; margin: 0px 0px 15px; overflow-wrap: break-word; overflow: auto hidden; padding: 15px 0px; position: relative; text-align: justify; width: 550px;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><img alt="" class="_photoImage" data-lazy-src="" height="693" id="20151201_147/sin10120_1448946846866W51OU_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.13.17.png" src="https://postfiles.pstatic.net/20151201_147/sin10120_1448946846866W51OU_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.13.17.png?type=w3" style="border: none; cursor: pointer;" width="550" /><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><img alt="" class="_photoImage" data-lazy-src="" height="848" id="20151201_4/sin10120_1448946912847b02mu_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.14.44.png" src="https://postfiles.pstatic.net/20151201_4/sin10120_1448946912847b02mu_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.14.44.png?type=w3" style="border: none; cursor: pointer;" width="534" /><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><img alt="" class="_photoImage" data-lazy-src="" height="828" id="20151201_212/sin10120_1448946975383aMcin_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.15.54.png" src="https://postfiles.pstatic.net/20151201_212/sin10120_1448946975383aMcin_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.15.54.png?type=w3" style="border: none; cursor: pointer;" width="550" /><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">6. 오버로딩과 오버라이딩 비교 (표9-1, p434)</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;"></span></p><table border="0" cellpadding="0" cellspacing="0" class="__se_tbl" style="border-bottom-color: initial; border-bottom-style: initial; border-image: initial; border-left-color: initial; border-left-style: initial; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-width: 1px 1px 0px 0px;"><tbody><tr><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 115px; word-break: break-all;"><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="font-family: 돋움, dotum;">비교 요소</span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 225px; word-break: break-all;"><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><span style="font-family: 돋움, dotum;">오버로딩</span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 206px; word-break: break-all;"><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><span style="font-family: 돋움, dotum;">오버라이딩 </span></p></td></tr><tr><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 115px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><span style="font-family: 돋움, dotum;"> 정의</span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 225px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">매개 변수 타입이나 개수가 다르나 이름이 같은 함수들이 중복 작성되는 것</span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 206px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">기본 클래스에 선언된 가상 함수를 파생 클래스에서 이름, 매개변수 개수, 매개 변수 타입, 리턴 타입 까지 완벽히 같은 원형으로 재작성함</span></p></td></tr><tr><td class="" style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 115px; word-break: break-all;"><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><span style="font-family: 돋움, dotum;"> 존재</span></p></td><td class="" style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 225px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">외부 함수들 사이, 한 클래스의 멤버들, 상속 관계</span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 206px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">상속 관계, 가상 함수에서만 적용 </span></p></td></tr><tr><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 115px; word-break: break-all;"><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><span style="font-family: 돋움, dotum;"> 목적</span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 225px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">이름이 동일한 여러 개의 함수를 중복 작성하여 사용의 편의성 향상 </span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 206px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">기본 클래스에 구현된 가상 함수를 무시하는 파생클래스이다.</span></p></td></tr><tr><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 115px; word-break: break-all;"><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><span style="font-family: 돋움, dotum;"> 바인딩</span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 225px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">정적 바인딩, 컴파일 시 중복된 함수들의 호출 구분</span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 206px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">동적 바인딩, 실행 시간에 오버라이딩된 함수를 찾아 실행함 </span></p></td></tr><tr><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 115px; word-break: break-all;"><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><span style="font-family: 돋움, dotum;"> 객체 지향 특성</span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 225px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">다형성 </span></p></td><td style="background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 1px 1px; height: 18px; width: 206px; word-break: break-all;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">다형성 </span></p></td></tr></tbody></table><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-size: 9pt;"><br /></span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">7. 동적바인딩. (그림 9-6, p425)</span></p><p align="justify" style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p align="justify" style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p align="justify" style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">class<span style="color: black;"> </span><span style="color: #006141;">Shape</span><span style="color: black;"> {</span></p><p align="justify" style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span>public<span style="color: black;"> :</span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">void</span> paint(){</p><p align="justify" style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> cout <<</span>"Shape::draw() called"<span style="color: black;"><<endl;</span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">};</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main() {</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #006141;">Shape</span> *pShape = <span style="color: #931a68;">new</span> <span style="color: #006141;">Shape</span>();</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="text-decoration-line: underline;">pShare</span>-><span style="text-decoration-line: underline;">paint</span>();</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">delete</span> pShape;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">//////// 실행결과</span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">Shape::draw() called</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="font-family: 돋움, dotum;">//////////////////////////////////////////////////////////////////////////</span></p><p align="justify" style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p align="justify" style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p align="justify" style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="text-decoration-line: underline;">class</span><span style="color: black; text-decoration-line: underline;"> </span><span style="color: #006141; text-decoration-line: underline;">Shape</span><span style="color: black; text-decoration-line: underline;"> {</span></p><p align="justify" style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span>public<span style="color: black;"> :</span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">void</span> paint(){ </p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> draw();</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p align="justify" style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span>virtual<span style="color: black;"> </span>void<span style="color: black;"> draw(){</span></p><p align="justify" style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> cout <<</span>"Shape::draw() called"<span style="color: black;"><<endl; </span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">};</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p align="justify" style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="text-decoration-line: underline;">class</span><span style="color: black; text-decoration-line: underline;"> </span><span style="color: #006141; text-decoration-line: underline;">Circle</span><span style="color: black; text-decoration-line: underline;"> : </span><span style="text-decoration-line: underline;">public</span><span style="color: black; text-decoration-line: underline;"> </span><span style="color: #006141; text-decoration-line: underline;">Shape</span><span style="color: black; text-decoration-line: underline;">{</span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"> </p><p align="justify" style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span>public<span style="color: black;"> :</span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">virtual</span> <span style="color: #931a68;">void</span> draw(){</p><p align="justify" style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> cout<<</span>"Circle ::draw()called"<span style="color: black;"><<endl;</span></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">};</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main() {</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #006141;">Shape</span> *pShape = <span style="color: #931a68;">new</span> <span style="color: #006141;">Circle</span>();</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> pShape->paint();</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">delete</span> pShape;</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> </p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><img alt="" class="_photoImage" data-lazy-src="" height="156" id="20151201_149/sin10120_1448947613393RFmct_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.26.36.png" src="https://postfiles.pstatic.net/20151201_149/sin10120_1448947613393RFmct_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_2.26.36.png?type=w3" style="border: none; cursor: pointer;" width="416" /><br /></p><p align="justify" style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><br /></p><div class="post-view pcol2 _param(1)" id="post-view220539924001" style="clear: both; color: #8a837e; line-height: 1.5; margin: 0px 0px 15px; overflow-wrap: break-word; overflow: auto hidden; padding: 15px 0px; position: relative; width: 757px;"><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">기본클래스에서 자신의 멤버를 호출하더라도 그것이 가상 함수이면 역시 동적 바인딩이 발생</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">동적 바인딩이 발생하는 구체적 경우</span></p><p style="line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">main()과 같은 외부 함수에서 기본 클래스의 포인터로 가상함수 호출</span></p><p style="line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">기본 클래스 내의 멤버 함수가 가상 함수 호출</span></p><p style="line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">파생 클래스 내의 멤버 함수가 가상 함수 호출</span></p><p style="line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">다른 클래스에서 가상 함수 호출</span></p><p style="line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;">*가상 함수를 호출한다면 , </span></p><p style="line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px;"><span style="color: black; font-family: 돋움, dotum; font-size: 9pt;"> 무조건 동적 바인딩을 통해 파생 클래스에 오버라이딩된 가상 함수가 실행된다.</span></p><div style="line-height: 1.5;"><br /></div></div><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"></p><div class="autosourcing-stub-extra" style="line-height: 1.5; opacity: 1; zoom: 1;"></div><p></p></div>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-83702520998726821242015-05-05T12:30:00.001+09:002021-02-10T18:49:36.241+09:00함수 중복과 static 멤버<p> <span style="font-family: "Apple SD Gothic Neo"; font-size: 9pt; text-align: justify;">1. 함수 중복 조건</span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-family: "Apple SD Gothic Neo"; font-size: 9pt;">중복된 함수들의 매개 변수 타입이 다르거나 개수가 달라야 함</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">중복된 함수들의 이름이 동일해야함</span><span style="color: black;"> </span></p><div style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin-left: 40px; text-align: justify;"><span style="color: black; font-family: "Apple SD Gothic Neo"; font-size: 9pt;">*리턴 타입은 함수 중복과 무관하다</span></div><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">2. 디폴트 매개변수 선언 및 호출 방법 (예제 6-3 소스코드)</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">//원형 선언</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">void</span> star(<span style="color: #931a68;">int</span> a=5);</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">void</span> msg(<span style="color: #931a68;">int</span> id, <span style="color: #006141;">string</span> text=<span style="color: #3933ff;">""</span>);</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">// 함수 구현</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">void</span> star(<span style="color: #931a68;">int</span> a){</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> <span style="color: #931a68;">for</span>(<span style="color: #931a68;">int</span> i=0;i<a;i++)</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> cout << <span style="color: #3933ff;">'*'</span>;</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> cout << endl;</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">void</span> msg(<span style="color: #931a68;">int</span> id, <span style="color: #006141;">string</span> text){</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> cout << id << <span style="color: #3933ff;">' '</span> << text << endl;</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">int</span> main(){</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black;"> </span>// star() 호출</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> star();</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> star(10);</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black;"> </span>// <span style="text-decoration-line: underline;">msg</span>() 호출</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> msg(10);</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> msg(10,<span style="color: #3933ff;">"Hello"</span>);</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">}</p><div style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; text-align: justify;"><br /></div><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><img alt="" class="_photoImage" data-lazy-src="" height="873" id="20151201_41/sin10120_1448944629692q9cb3_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.36.33.png" src="https://postfiles.pstatic.net/20151201_41/sin10120_1448944629692q9cb3_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.36.33.png?type=w3" style="border: none; cursor: pointer;" width="550" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="240" id="20151201_183/sin10120_1448944630067Bttw2_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.36.40.png" src="https://postfiles.pstatic.net/20151201_183/sin10120_1448944630067Bttw2_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.36.40.png?type=w3" style="border: none; cursor: pointer;" width="304" /> </p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">3. 디폴트 매개변수의 제약조건</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">디폴트 매개 변수는 보통 매개 변수 앞에 선언될 수 없음</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">(</span><span style="color: black; font-size: 9pt;">디폴트 매개 변수는 끝 쪽에 몰려 선언되어야 함)</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">void calc(int a, int b=5, int c, int d=0);</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">void sum(int a=0, int b, int c);</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;"><컴파일 불가></span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">void calc(int a, int b=5, int c=0, int d=0);</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;"><컴파일 가능></span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">4. 디폴트 매개변수를 이용하여 함수 간소화 (예제 6-5 소스코드)</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;"><br /></span></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">void</span> fillLine(<span style="color: #931a68;">int</span> n=25, <span style="color: #931a68;">char</span> c=<span style="color: #3933ff;">'*'</span>){ <span style="color: #4e9072;">// n개의 c 문자를 한 라인에 출력</span></p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> <span style="color: #931a68;">for</span>(<span style="color: #931a68;">int</span> i=0; i<n; i++)</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> cout << c;</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"> cout << endl;</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: #931a68;">int</span> main() {</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black;"> fillLine(); </span>// 25개의 '*'를 한 라인에 출력</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black;"> fillLine(10, </span><span style="color: #3933ff;">'%'</span><span style="color: black;">); </span>// 10개의 '%'를 한 라인에 출력</p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px; text-align: justify;">}</p><div style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; text-align: justify;"><br /></div><div style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; text-align: justify;"><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">/*</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">void fillLine(){ // 25 개의 '*' 문자를 한 라인에 출력</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> for(<span style="text-decoration-line: underline;">int</span> i=0; i<25; i++)</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="text-decoration-line: underline;">cout</span> << '*';</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="text-decoration-line: underline;">cout</span> << <span style="text-decoration-line: underline;">endl</span>;</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">void fillLine(<span style="text-decoration-line: underline;">int</span> n, char c){ // n개의 c 문자를 한 라인에 출력</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> for(<span style="text-decoration-line: underline;">int</span> i=0; i<n; i++)</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="text-decoration-line: underline;">cout</span> << c;</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="text-decoration-line: underline;">cout</span> << <span style="text-decoration-line: underline;">endl</span>;</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">*/</p></div><div style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; text-align: justify;"><br /></div><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><img alt="" class="_photoImage" data-lazy-src="" height="450" id="20151201_229/sin10120_1448945025413aKXls_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.42.43.png" src="https://postfiles.pstatic.net/20151201_229/sin10120_1448945025413aKXls_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.42.43.png?type=w3" style="border: none; cursor: pointer;" width="550" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="180" id="20151201_57/sin10120_1448945025873JOC0y_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.42.52.png" src="https://postfiles.pstatic.net/20151201_57/sin10120_1448945025873JOC0y_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.42.52.png?type=w3" style="border: none; cursor: pointer;" width="418" /> </p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;">5. static 멤버와 non-static 멤버 비교</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;"><span style="font-size: 9pt;"></span> </span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><span style="color: black; font-size: 9pt;"><static 멤버></span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 120px; padding: 0px; text-align: justify;">1. 프로그램과 생명을 같이한다</p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 160px; padding: 0px; text-align: justify;">*프로그램 시작 시 멤버 생성</p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 160px; padding: 0px; text-align: justify;">*객체가 생기기 전에 이미 존재</p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 160px; padding: 0px; text-align: justify;">*객체가 사라져도 존재함</p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 160px; padding: 0px; text-align: justify;">*프로그램 종료시 소멸</p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 120px; padding: 0px; text-align: justify;"><span style="color: #333333;">2.동일한 클래스의 모든 객체들에 의해 공유됨</span></p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 120px; padding: 0px; text-align: justify;">3. 멤버는 클래스 당 하나 생성되며 멤버는 객체 내부가 아니라 별도의 공간에 생성됨(클레스 멤버라고 부른다.)</p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px; text-align: justify;"><non-static 멤버></p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 120px; padding: 0px; text-align: justify;">1.객체와 생명을 같이 한다</p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 160px; padding: 0px; text-align: justify;">* 객체 생성시 멤버생성</p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 160px; padding: 0px; text-align: justify;">* 객체 소멸 시 함께 소멸</p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 160px; padding: 0px; text-align: justify;">* 객체 생성 후 객체 사용 가능</p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 120px; padding: 0px; text-align: justify;">2.공유 되지 않는다 (멤버는 객체 별도의 공간 유지함)</p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 120px; padding: 0px; text-align: justify;">3.멤버는 객체마다 별도 생성함(인스턴스 멤버)</p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 120px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "Apple SD Gothic Neo"; font-size: 13.3333px; line-height: 1.5; margin: 0px 0px 0px 120px; padding: 0px; text-align: justify;"></p>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-40241810867213764912015-04-21T18:48:00.001+09:002021-02-10T18:48:59.239+09:00함수와 참조, 복사생성자<p> <span style="color: #5f5e42; font-family: 굴림, gulim; font-size: 10pt; text-align: justify;">1. c++에서 함수의 인자전달 방법</span></p><div id="postViewArea"><div class="post-view pcol2 _param(1) _postViewArea220554748780" id="post-view220554748780" style="clear: both; color: #5f5e42; font-family: 돋움; font-size: 12px; line-height: 1.5; margin: 0px 0px 15px; overflow-wrap: break-word; overflow: auto hidden; padding: 15px 0px; position: relative; text-align: justify; width: 550px;"><div class="view" style="font-family: "1003773_10"; font-size: 10pt; line-height: 1.5;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> </span><span style="color: black; font-family: 굴림, gulim;">(1) call_by_value 작동과정 </span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black;"><span style="font-family: 굴림, gulim;">인수의 값을 전달함 -> </span></span><span style="color: black; font-family: 굴림, gulim; line-height: 1.5;">함수가 호출되면 매개 변수가 스택에 생성됨 -> </span><span style="color: black; font-family: 굴림, gulim;">호출하는 코드에서 값을 넘겨줌</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;">->호출하는 코드에서 넘어온 값이 매개 변수에 복사됨</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> *</span><span style="color: black; font-family: 굴림, gulim;">생성자와 소멸자의 비대칭 으로 실행되는 문제점이 있음.</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> </span><span style="color: black; font-family: 굴림, gulim;">(2) call_by_address 작동과정 </span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black;"><span style="font-family: 굴림, gulim;">인수의 주소를 전달 (</span></span><span style="color: black; font-family: 굴림, gulim;">함수의 매개 변수는 포인터 타입) </span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;">-> </span><span style="color: black; font-family: 굴림, gulim;">함수가 호출되면 포인터 타입의 매개 변수가 스택에 생성됨 </span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;">-> </span><span style="color: black; font-family: 굴림, gulim;">호출하는 코드에서는 명시적으로 주소를 넘겨줌</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> * 호출하는 코드에서 넘어온 주소 값이 매개 변수에 저장됨</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> </span><span style="color: black; font-family: 굴림, gulim;">(3) call_by_reference 작동과정</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black;"><span style="font-family: 굴림, gulim;">함수의 매개 변수를 참조 타입으로 선언</span></span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;">*참조 매개 변수라고 부름(</span><span style="color: black; font-family: 굴림, gulim;">참조 매개 변수는 실인자 변수를 참조함)</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;">*참조매개 변수의 이름만 생기고 공간이 생기지 않음</span></p><p style="font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: #333333;"><span style="font-family: 굴림, gulim;">*</span></span><span style="color: black; font-family: 굴림, gulim;">참조 매개 변수는 실인자 변수 공간 공유</span></p><p style="font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: #333333;"><span style="font-family: 굴림, gulim;">*</span></span><span style="color: black; font-family: 굴림, gulim;">참조 매개 변수에 대한 조작은 실인자 변수 조작 효과</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 굴림, gulim;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 굴림, gulim;">2. 객체를 복사하는 코드</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><img alt="" class="_photoImage" data-lazy-src="" height="530" id="20151201_40/sin10120_1448943969054xuPu0_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.25.35.png" src="https://postfiles.pstatic.net/20151201_40/sin10120_1448943969054xuPu0_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.25.35.png?type=w3" style="border: none; cursor: pointer;" width="550" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="220" id="20151201_137/sin10120_1448943969275EVsdG_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.25.50.png" src="https://postfiles.pstatic.net/20151201_137/sin10120_1448943969275EVsdG_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-12-01_%BF%C0%C8%C4_1.25.50.png?type=w3" style="border: none; cursor: pointer;" width="402" /> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 굴림, gulim;">3. 객체복사시 복사 생성자가 실행됨.</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim; line-height: 1.5;"> (1) 얕은 복사 개념 : </span></p><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 굴림, gulim;">객체의 멤버를 1:1로 복사함</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> *객체의 멤버 변수에 동적 메모리가 할당된 경우</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> 사본은 원본 객체가 할당받은 메모리를 공유하는 문제 발생</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> </span><span style="color: black; font-family: 굴림, gulim;"> </span><span style="color: black; font-family: 굴림, gulim;">(2) 깊은 복사 개념 :</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;">객체의 멤버를 1:1로 복사함</span></p><p style="color: #333333; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black;"><span style="font-family: Apple SD Gothic Neo;"> * </span></span><span style="color: black; font-family: 굴림, gulim;">객체의 멤버 변수에 동적 메모리가 할당된 경우</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> 사본은 원본이 가진 메모리 크기 만큼 별도로 동적 할당하고</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> </span><span style="color: black; font-family: 굴림, gulim;">원본의 동적 메모리에 있는 내용을 사본에 복사함</span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black;"><br /></span></p><p style="color: #333333; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 굴림, gulim;"> * 완전한 형태의 복사라서 얕은 복사의 문제점인 </span><span style="color: black; font-family: 굴림, gulim;">사본과 원본이 메모리를 공유하는 문제가 없음</span></p><div><span style="color: black; font-family: 굴림, gulim;"><br /></span></div></div></div></div>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-72802858021226578052015-04-07T10:30:00.001+09:002021-02-10T18:48:25.018+09:00객체포인터와 객체배열, 객체의 동적생성<p> <span style="font-family: "1003773_10"; font-size: 10pt; text-align: justify;">1. 객체포인터 </span></p><div id="postViewArea"><div class="post-view pcol2 _param(1) _postViewArea220523962066" id="post-view220523962066" style="clear: both; color: #5f5e42; font-family: 돋움; font-size: 12px; line-height: 1.5; margin: 0px 0px 15px; overflow-wrap: break-word; overflow: auto hidden; padding: 15px 0px; position: relative; text-align: justify; width: 550px;"><div class="view" style="font-family: "1003773_10"; font-size: 10pt; line-height: 1.5;"><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black;"> (1) 객체 포인터 변수선언방법</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black;"><br /></span></p><p align="justify" style="color: #7d7d7d; font-family: "3653762_9"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">Circle *p; //Circle 타입에 대한 포인터변수p</span></p><div align="justify" style="line-height: 1.5;"><br /></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black;"> (2) 포인터변수에 주소지정방법</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black;"><br /></span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"></span><span style="color: black; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">p = &donut; //도넛객체의 주소저장</span></p><p align="justify" style="color: #7d7d7d; font-family: "3653762_9"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"><span style="color: black;">Circle* p = &donut; //포인터 변수 선언시 주소로 초기화 가능</span></span></p><div align="justify" style="line-height: 1.5;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"><br /></span></div><div align="justify" style="line-height: 1.5;"><span style="color: #7d7d7d; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"><br /></span></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black;"> (3) 포인터를 이용한 객체 멤버접근</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black;"><br /></span></p><p align="justify" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"><span style="color: black;">d = donut.getArea(); // 객체 이름으로 멤버를 접근함</span></span></p><p align="justify" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"><span style="color: black;">d = p->getArea(); // 객체 포인터로 멤버를 접근할때는 ->를 쓴다 </span></span></p><p align="justify" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic;">또는</span></p><p align="justify" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"><span style="color: black;">d = (*p).getArea(); // 괄호를 넣어서 .을 쓸수도 있다.</span></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: #7d7d7d; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><div class="autosourcing-stub-extra-saved" style="line-height: 1.5; opacity: 0;"><p align="justify" style="font-family: Dotum; font-size: 12px; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="padding: 0px 7px 0px 0px;">[출처]</span> <a class="con_link" href="http://blog.naver.com/jklj12/220523257586" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">4. 객체포인터와 객체배열, 객체의 동적생성 </a><span style="padding: 0px 7px 0px 5px;">|</span><span style="padding: 0px 7px 0px 0px;">작성자</span> <a class="con_link" href="http://blog.naver.com/jklj12" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">jklj12</a></p></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">2, 객체배열</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"> (1) 객체 배열 선언방법</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"><br /></span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">Circle circleArray[3]; // Circle 객체의 배열 circleArray 를 선언</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: #7d7d7d; font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"></span></p><div align="justify" class="autosourcing-stub-extra-saved" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; opacity: 0;"><p style="font-family: Dotum; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="padding: 0px 7px 0px 0px;"><br /></span></p><p style="font-family: Dotum; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="padding: 0px 7px 0px 0px;">[출처]</span> <a class="con_link" href="http://blog.naver.com/jklj12/220523257586" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">4. 객체포인터와 객체배열, 객체의 동적생성 </a><span style="padding: 0px 7px 0px 5px;">|</span><span style="padding: 0px 7px 0px 0px;">작성자</span> <a class="con_link" href="http://blog.naver.com/jklj12" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">jklj12</a>ㅇ</p></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"> (2) 객체 배열을 이용한 멤버접근</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"><span style="font-size: 10pt;">circleArray[0].setRadius(10);</span></span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"><span style="font-size: 10pt;">circleArray[1].setRadius(20);</span></span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"><span style="font-size: 10pt;"><span style="font-size: 18pt;"><span style="font-size: 10pt;"><span style="font-size: 10pt;">circleArray[2].setRadius(30);</span></span></span></span></span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"><span style="font-size: 10pt;"><br /></span></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: #7d7d7d; font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"></span></p><div align="justify" class="autosourcing-stub-extra-saved" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; opacity: 0;"><p style="font-family: Dotum; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="padding: 0px 7px 0px 0px;">[출처]</span> <a class="con_link" href="http://blog.naver.com/jklj12/220523257586" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">4. 객체포인터와 객체배열, 객체의 동적생성 </a><span style="padding: 0px 7px 0px 5px;">|</span><span style="padding: 0px 7px 0px 0px;">작성자</span> <a class="con_link" href="http://blog.naver.com/jklj12" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">jklj12</a></p></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"> (3) 객체배열 소멸순서</p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"><span style="font-size: 10pt;">circleArrat[2] 소멸자 실행 -> <span style="font-size: 18pt;"><span style="font-size: 10pt;">circleArrat[1] 소멸자 실행 -> <span style="font-size: 18pt;"><span style="font-size: 10pt;">circleArrat[0] 소멸자 실행 (생성자 역순으로 소멸)</span></span></span></span></span></span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;">객체배열도 생성자 역순으로 소멸됨</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"><span style="font-size: 10pt;"></span></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: #7d7d7d; font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"></span></p><div align="justify" class="autosourcing-stub-extra-saved" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; opacity: 0;"><p style="font-family: Dotum; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="padding: 0px 7px 0px 0px;">[출처]</span> <a class="con_link" href="http://blog.naver.com/jklj12/220523257586" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">4. 객체포인터와 객체배열, 객체의 동적생성 </a><span style="padding: 0px 7px 0px 5px;">|</span><span style="padding: 0px 7px 0px 0px;">작성자</span> <a class="con_link" href="http://blog.naver.com/jklj12" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">jklj12</a></p></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">3. 정적할당 개념</p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">프로그램 실행 전에 미리 할당 받는것으로 </span><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">Java의 경우 static이 정적에 해당됨</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic;">stack과 data 영역에 컴파일시 할당되어야 할 메모리들로 , 전역변수 지역변수가 정적부분에 해당됨</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"></span><span style="color: #7d7d7d; font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"></span></p><div align="justify" class="autosourcing-stub-extra-saved" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; opacity: 0;"><p style="font-family: Dotum; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="padding: 0px 7px 0px 0px;">[출처]</span> <a class="con_link" href="http://blog.naver.com/jklj12/220523257586" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">4. 객체포인터와 객체배열, 객체의 동적생성 </a><span style="padding: 0px 7px 0px 5px;">|</span><span style="padding: 0px 7px 0px 0px;">작성자</span> <a class="con_link" href="http://blog.naver.com/jklj12" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">jklj12</a></p></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">4. 동적할당개념</p><div align="justify" style="line-height: 1.5; margin-left: 40px;"><br /></div><div align="justify" style="line-height: 1.5; margin-left: 40px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">운영체제에 일정 메모리 크기만큼 요청해 메모리를 </span><span class="highlight" style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">동적</span><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">(dynamic)으로 </span><span class="highlight" style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">할당</span><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"> 받는 방법</span></div><div align="justify" style="line-height: 1.5; margin-left: 40px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">변수 선언을 해서 메모리를 </span><span class="highlight" style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">할당</span><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"> 받는 방법이 아님</span></div><div align="justify" style="line-height: 1.5;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"><br /></span></div><p align="justify" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: #7d7d7d; font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><div class="autosourcing-stub-extra-saved" style="line-height: 1.5; opacity: 0;"><p align="justify" style="font-family: Dotum; font-size: 12px; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="padding: 0px 7px 0px 0px;">[출처]</span> <a class="con_link" href="http://blog.naver.com/jklj12/220523257586" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">4. 객체포인터와 객체배열, 객체의 동적생성 </a><span style="padding: 0px 7px 0px 5px;">|</span><span style="padding: 0px 7px 0px 0px;">작성자</span> <a class="con_link" href="http://blog.naver.com/jklj12" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">jklj12</a></p></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">5. 변수, 배열, 객체, 객체배열 동적할당과 소멸 코드설명 (수업시간 칠판내용)</p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"><br /></span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[1]변수</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"></span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">할당</span><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"></span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">int *p = new int(5);</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">반환</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">delete p;</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[2]배열</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">할당</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">int *p = new int[5];</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">int *p = new int[5](30); -> 오류, 크기값 지정 못함.</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">[] - 크기</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">() - 크기값</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">반환</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">delete [] p;</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[3]객체</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">할당</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">Circle *p = new Circle(30);</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">반환</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">delete p;</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">-생성 순서와 상관없이 삭제할 순서 지정이 가능</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[4]객체배열</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">할당</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">Circle *p = new Circle[3]</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">반환</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">delete [] p;</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">-삭제 순서는 생성된 순서 역순</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">크기값을 지정할때는 setRadius() 함수를 사용</span></p><p align="justify" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: #7d7d7d; font-family: 돋움체, dotumche, applegothic; font-size: 18pt;"></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><div class="autosourcing-stub-extra-saved" style="line-height: 1.5; opacity: 0;"><p align="justify" style="font-family: Dotum; font-size: 12px; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="padding: 0px 7px 0px 0px;">[출처]</span> <a class="con_link" href="http://blog.naver.com/jklj12/220523257586" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">4. 객체포인터와 객체배열, 객체의 동적생성 </a><span style="padding: 0px 7px 0px 5px;">|</span><span style="padding: 0px 7px 0px 0px;">작성자</span> <a class="con_link" href="http://blog.naver.com/jklj12" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">jklj12</a></p></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">6. 메모리 누수현상이 발생하는 이유</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">동적으로 할당받은 메모리의 주소를 잃어버려 힙에 반환할 수 없게 되면 메모리 누수가 발생함</span></p><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">메모리 누수가 계속 발생하여 힙의 크기가 줄어들게 되면, 실행중에 메모리를 할당받을 수 없는 상황이 초래됨</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: #7d7d7d; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;"></span></p><div class="autosourcing-stub-extra-saved" style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; opacity: 0;"><p style="font-family: Dotum; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="padding: 0px 7px 0px 0px;">[출처]</span> <a class="con_link" href="http://blog.naver.com/jklj12/220523257586" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">4. 객체포인터와 객체배열, 객체의 동적생성 </a><span style="padding: 0px 7px 0px 5px;">|</span><span style="padding: 0px 7px 0px 0px;">작성자</span> <a class="con_link" href="http://blog.naver.com/jklj12" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank">jklj12</a></p></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">7. this가 필요한 경우</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">this는 객체 자신에 대한 포인터으로 </span><span style="color: black; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">각 객체 속의 this는 다른 객체 속의 this와 서로 다른 포인터임을 알리기 위해서 사용된다.</span></p><p style="color: #7d7d7d; font-family: "3653762_9"; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">멤버 변수의 이름과 동일한 이름으로 매개 변수 이름을 짓고자 하는 경우와 </span></p><p style="color: #7d7d7d; font-family: "3653762_9"; line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">객체의 멤버 함수에서 객체 자신의 주소를 리턴 할 때 </span><span style="color: black; font-family: 돋움체, dotumche, applegothic; font-size: 9pt;">this는 반드시 필요하다.</span></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><div class="autosourcing-stub-extra-saved" style="line-height: 1.5; opacity: 0;"><p style="font-family: Dotum; font-size: 12px; line-height: 1.5; margin: 11px 0px 7px; padding: 0px;"><span style="color: black; padding: 0px 7px 0px 0px;">[출처]</span><span style="color: black;"> </span><a class="con_link" href="http://blog.naver.com/jklj12/220523257586" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank"><span style="color: black;">4. 객체포인터와 객체배열, 객체의 동적생성</span><span style="color: black;"> </span></a><span style="color: black; padding: 0px 7px 0px 5px;">|</span><span style="color: black; padding: 0px 7px 0px 0px;">작성자</span><span style="color: black;"> </span><a class="con_link" href="http://blog.naver.com/jklj12" style="overflow-wrap: break-word; text-decoration-line: none;" target="_blank"><span style="color: black;">jklj12</span></a></p></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">8. string 클래스를 이용한 문자열 예제(11가지, 수업시간 실습예제)</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[1]문자열 치환</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"><br /></span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">#include <span style="text-decoration-line: underline;"><stdio.h></span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">#include <span style="text-decoration-line: underline;"><iostream></span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using <span style="text-decoration-line: underline;">namespace</span> <span style="text-decoration-line: underline;">std</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="text-decoration-line: underline;">int</span> main(<span style="text-decoration-line: underline;">int</span> <span style="text-decoration-line: underline;">argc</span>, char** <span style="text-decoration-line: underline;">argv</span>){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> string a="Java", b="C++";</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="text-decoration-line: underline;">cout</span> << "a = " << a << <span style="text-decoration-line: underline;">endl</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> a=b;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="text-decoration-line: underline;">cout</span> << "a = " << a << <span style="text-decoration-line: underline;">endl</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"> </p><p style="background-color: white; color: #8a837e; font-family: "Apple SD Gothic Neo"; line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><img alt="" class="_photoImage" data-lazy-src="" height="438" id="20151130_115/sin10120_1448887941900y3smQ_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_9.51.14.png" src="https://postfiles.pstatic.net/20151130_115/sin10120_1448887941900y3smQ_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_9.51.14.png?type=w3" style="border: none rgb(0, 0, 0); cursor: pointer;" width="516" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="282" id="20151130_298/sin10120_1448887942166iiJln_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_9.51.42.png" src="https://postfiles.pstatic.net/20151130_298/sin10120_1448887942166iiJln_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_9.51.42.png?type=w3" style="border: none; cursor: pointer;" width="530" /> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[2]문자열 비교( compare() 함수)</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #006141;">string</span> name=<span style="color: #3933ff;">"</span><span style="color: #3933ff; text-decoration-line: underline;">Kitae</span><span style="color: #3933ff;">"</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #006141;">string</span> alias=<span style="color: #3933ff;">"</span><span style="color: #3933ff; text-decoration-line: underline;">Kito</span><span style="color: #3933ff;">"</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">int</span> res=name.compare(alias); <span style="color: #4e9072;">// name과 alias를 비교</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">if</span>(res==0)</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cout << <span style="color: #3933ff;">"두 문자열이 같다"</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">else</span> <span style="color: #931a68;">if</span>(res<0)</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cout << name << <span style="color: #3933ff;">" < "</span> << alias << endl; <span style="color: #4e9072;">// name이 앞</span></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span>else</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cout << alias << <span style="color: #3933ff;">" < "</span> << name << endl; <span style="color: #4e9072;">// name이 뒤</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><br /></div><p style="line-height: 1.5; margin: 0px; padding: 0px;"><img alt="" class="_photoImage" data-lazy-src="" height="277" id="20151130_192/sin10120_1448888251385yjnfN_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_9.56.45.png" src="https://postfiles.pstatic.net/20151130_192/sin10120_1448888251385yjnfN_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_9.56.45.png?type=w3" style="border: none; cursor: pointer;" width="400" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="154" id="20151130_272/sin10120_14488882516922L4nA_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_9.56.56.png" src="https://postfiles.pstatic.net/20151130_272/sin10120_14488882516922L4nA_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_9.56.56.png?type=w3" style="border: none; cursor: pointer;" width="400" /> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[3]문자열 연결(append() 함수)</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #006141;">string</span> a(<span style="color: #3933ff;">"I"</span>);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>a.append(<span style="color: #3933ff;">" love"</span>); <span style="color: #4e9072;">//문자열연결</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << a << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><br /></div><p style="line-height: 1.5; margin: 0px; padding: 0px;"><img alt="" class="_photoImage" data-lazy-src="" height="312" id="20151130_266/sin10120_14488885151531vCM7_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.01.03.png" src="https://postfiles.pstatic.net/20151130_266/sin10120_14488885151531vCM7_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.01.03.png?type=w3" style="border: none; cursor: pointer;" width="400" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="157" id="20151130_123/sin10120_1448888515405wFvNu_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.01.11.png" src="https://postfiles.pstatic.net/20151130_123/sin10120_1448888515405wFvNu_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.01.11.png?type=w3" style="border: none; cursor: pointer;" width="400" /> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[4]문자열 삽입(insert() 함수)</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"></span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << </span>"012345678901234567890"<span style="color: black;"> << endl;</span></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="color: #006141;">string</span><span style="color: black;"> a(</span>"I love C++"<span style="color: black;">);</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>a.insert(2, <span style="color: #3933ff;">"really "</span>);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << a << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><br /></div><div style="line-height: 1.5;"><img alt="" class="_photoImage" data-lazy-src="" height="272" id="20151130_76/sin10120_144888861178815KOU_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.02.56.png" src="https://postfiles.pstatic.net/20151130_76/sin10120_144888861178815KOU_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.02.56.png?type=w3" style="border: none; cursor: pointer;" width="400" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="184" id="20151130_81/sin10120_1448888612046Jdwrz_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.03.04.png" src="https://postfiles.pstatic.net/20151130_81/sin10120_1448888612046Jdwrz_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.03.04.png?type=w3" style="border: none; cursor: pointer;" width="400" /> </div><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[5]문자열 길이(Length() 함수)</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"><br /></span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="color: #006141;">string</span><span style="color: black;"> a(</span>"I love C++"<span style="color: black;">);</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">int</span> length=a.length();</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">int</span> size=a.size();</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">int</span> capacity=a.capacity();</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << <span style="color: #3933ff;">"length = "</span> << length << <span style="color: #3933ff;">", size = "</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><< size << <span style="color: #3933ff;">", capacity = "</span> << capacity << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><br /></div><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><img alt="" class="_photoImage" data-lazy-src="" height="258" id="20151130_162/sin10120_1448888698003IXGiF_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.04.27.png" src="https://postfiles.pstatic.net/20151130_162/sin10120_1448888698003IXGiF_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.04.27.png?type=w3" style="border: none; cursor: pointer;" width="400" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="123" id="20151130_26/sin10120_1448888698306qP5mP_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.04.36.png" src="https://postfiles.pstatic.net/20151130_26/sin10120_1448888698306qP5mP_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.04.36.png?type=w3" style="border: none; cursor: pointer;" width="400" /> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;"></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[6]문자열 삭제(clear() 함수)</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체;"><br /></span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << </span>"012345678901234567890"<span style="color: black;"> << endl;</span></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="color: #006141;">string</span><span style="color: black;"> a(</span>"I love C++"<span style="color: black;">);</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << a << endl;</p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span>a.erase(0,7); </span>// erase(시작위치, 삭제할 갯수)</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << <span style="color: #3933ff;">" a = "</span> << a << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>a.clear();</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << <span style="color: #3933ff;">" a = "</span> << a << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><img alt="" class="_photoImage" data-lazy-src="" height="300" id="20151130_22/sin10120_1448888805770ST74x_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.06.17.png" src="https://postfiles.pstatic.net/20151130_22/sin10120_1448888805770ST74x_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.06.17.png?type=w3" style="border: none; cursor: pointer;" width="400" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="252" id="20151130_35/sin10120_1448888806098oG3Jc_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.06.24.png" src="https://postfiles.pstatic.net/20151130_35/sin10120_1448888806098oG3Jc_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.06.24.png?type=w3" style="border: none; cursor: pointer;" width="342" /> </div><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체;"><br /></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체;"><br /></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체;"><span style="font-family: 돋움체, dotumche, applegothic; font-size: 10pt;">[7]문자열 일부분 발췌(잘라내는 것)(substr() 함수)</span></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체;"><br /></span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << </span>"012345678901234567890"<span style="color: black;"> << endl;</span></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="color: #006141;">string</span><span style="color: black;"> b=</span>"I love C++"<span style="color: black;">;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << b << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #006141;">string</span> c=b.substr(2,4); <span style="color: #4e9072;">// </span><span style="color: #4e9072; text-decoration-line: underline;">substr</span><span style="color: #4e9072;">(시작위치, 갯수)</span></p><p style="color: #4e9072; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="color: #006141;">string</span><span style="color: black;"> d=b.substr(2); </span>// <span style="text-decoration-line: underline;">substr</span>(시작위치) -> 시작위치 ~ 끝까지 추출함</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << <span style="color: #3933ff;">"c = "</span> << c << endl << <span style="color: #3933ff;">"d = "</span> << d << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><img alt="" class="_photoImage" data-lazy-src="" height="300" id="20151130_187/sin10120_14488890703577S0bi_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.06.17.png" src="https://postfiles.pstatic.net/20151130_187/sin10120_14488890703577S0bi_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.06.17.png?type=w3" style="border: none; cursor: pointer;" width="400" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="252" id="20151130_139/sin10120_1448889070619dWztF_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.06.24.png" src="https://postfiles.pstatic.net/20151130_139/sin10120_1448889070619dWztF_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.06.24.png?type=w3" style="border: none; cursor: pointer;" width="342" /> </div><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="font-family: 돋움체;"></span> </p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic;">[8]문자열 검색(find() 함수)</span></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic;"></span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << </span>"012345678901234567890"<span style="color: black;"> << endl;</span></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="color: #006141;">string</span><span style="color: black;"> e= </span>"I love love C++"<span style="color: black;">;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << e << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">int</span> index=e.find(<span style="color: #3933ff;">"love"</span>);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << <span style="color: #3933ff;">"index = "</span> << index << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>index=e.find(<span style="color: #3933ff;">"love"</span>, index+1);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << <span style="color: #3933ff;">"index = "</span> << index << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>index=e.find(<span style="color: #3933ff;">"C#"</span>);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << <span style="color: #3933ff;">"index = "</span> << index << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>index=e.find(<span style="color: #3933ff;">'v'</span>, 7);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << <span style="color: #3933ff;">"index = "</span> << index << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><img alt="" class="_photoImage" data-lazy-src="" height="551" id="20151130_53/sin10120_144888917916871peO_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.12.33.png" src="https://postfiles.pstatic.net/20151130_53/sin10120_144888917916871peO_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.12.33.png?type=w3" style="border: none; cursor: pointer;" width="550" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="296" id="20151130_92/sin10120_1448889179649JnPJM_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.12.38.png" src="https://postfiles.pstatic.net/20151130_92/sin10120_1448889179649JnPJM_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.12.38.png?type=w3" style="border: none; cursor: pointer;" width="348" /> </div><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic;">[9]특정위치 문자추출</span></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << </span>"012345678901234567890"<span style="color: black;"> << endl;</span></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="color: #006141;">string</span><span style="color: black;"> f(</span>"I love C++"<span style="color: black;">);</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << f << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">char</span> ch1=f.at(7);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">char</span> ch2=f[7];</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << <span style="color: #3933ff;">"ch1 = "</span> << ch1 << <span style="color: #3933ff;">", ch2 = "</span> << ch2 << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><img alt="" class="_photoImage" data-lazy-src="" height="331" id="20151130_28/sin10120_1448889304096Ua1Sg_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.14.41.png" src="https://postfiles.pstatic.net/20151130_28/sin10120_1448889304096Ua1Sg_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.14.41.png?type=w3" style="border: none; cursor: pointer;" width="550" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="146" id="20151130_82/sin10120_1448889304293O3997_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.14.48.png" src="https://postfiles.pstatic.net/20151130_82/sin10120_1448889304293O3997_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.14.48.png?type=w3" style="border: none; cursor: pointer;" width="324" /> </div><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic;">[10]문자열의 숫자 변환 stoi()</span></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #006141;">string</span> year=<span style="color: #3933ff;">"2014"</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << year << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">int</span> n=<span style="color: #793d93;">atoi</span>(year.c_str());</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << n << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><img alt="" class="_photoImage" data-lazy-src="" height="456" id="20151130_80/sin10120_1448889373495lWmqK_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.15.48.png" src="https://postfiles.pstatic.net/20151130_80/sin10120_1448889373495lWmqK_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.15.48.png?type=w3" style="border: none; cursor: pointer;" width="530" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="200" id="20151130_87/sin10120_1448889373750VMFF5_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.15.53.png" src="https://postfiles.pstatic.net/20151130_87/sin10120_1448889373750VMFF5_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.15.53.png?type=w3" style="border: none; cursor: pointer;" width="386" /> </div><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic;"></span></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic;">[11]문자 함수 </span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span>** argv){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="color: #006141;">string</span><span style="color: black;"> a=</span>"hello"<span style="color: black;">;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #931a68;">for</span>(<span style="color: #931a68;">int</span> i=0;i<a.length();i++)</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> a[i]=toupper(a[i]);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << a;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #7d7d7d; font-family: "3653762_9"; line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><img alt="" class="_photoImage" data-lazy-src="" height="448" id="20151130_88/sin10120_1448889603197GxhN7_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.19.34.png" src="https://postfiles.pstatic.net/20151130_88/sin10120_1448889603197GxhN7_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.19.34.png?type=w3" style="border: none; cursor: pointer;" width="536" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="174" id="20151130_85/sin10120_1448889603394jJoih_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.19.41.png" src="https://postfiles.pstatic.net/20151130_85/sin10120_1448889603394jJoih_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.19.41.png?type=w3" style="border: none; cursor: pointer;" width="288" /> </div><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic;"></span></p><p style="color: #7d7d7d; font-family: "3653762_9"; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black; font-family: 돋움체, dotumche, applegothic;"></span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black;">9. Person클래스를 이용한 정보검색프로그램(교재 p207, 실습문제 7번)</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="color: black;"> 소스코드, 실행결과, 주석</span></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><cstdlib></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><stdio.h></p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">#include</span><span style="color: black;"> </span><iostream></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">using<span style="color: black;"> </span>namespace<span style="color: black;"> std;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #006141; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">class</span><span style="color: black;"> </span>Person<span style="color: black;">{</span></p><p style="color: #006141; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span>string<span style="color: black;"> </span><span style="color: #0326cc;">name</span><span style="color: black;">;</span></p><p style="color: #006141; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span>string<span style="color: black;"> </span><span style="color: #0326cc;">tel</span><span style="color: black;">;</span></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">public<span style="color: black;">:</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> Person();</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #006141;">string</span> getName(){ <span style="color: #931a68;">return</span> <span style="color: #0326cc;">name</span>; }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #006141;">string</span> getTel(){ <span style="color: #931a68;">return</span> <span style="color: #0326cc;">tel</span>; }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">void</span> set(<span style="color: #006141;">string</span> name, <span style="color: #006141;">string</span> tel);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">};</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">Person::Person() { <span style="color: #4e9072;">//생성자함수 - 초기값지정</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">this</span>-><span style="color: #0326cc;">name</span>=<span style="color: #3933ff;">""</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">this</span>-><span style="color: #0326cc;">tel</span>=<span style="color: #3933ff;">""</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">void</span> Person::set(<span style="color: #006141;">string</span> name, <span style="color: #006141;">string</span> tel){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">this</span>-><span style="color: #0326cc;">name</span>=name;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">this</span>-><span style="color: #0326cc;">tel</span> = tel;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #006141; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">class</span><span style="color: black;"> </span>PersonManager<span style="color: black;">{</span></p><p style="color: #006141; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span>Person<span style="color: black;"> *</span><span style="color: #0326cc;">p</span><span style="color: black;">;</span></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">public<span style="color: black;">:</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> PersonManager(<span style="color: #931a68;">int</span> n){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #0326cc;">p</span>=<span style="color: #931a68;">new</span> <span style="color: #006141;">Person</span>[n];</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #006141;">string</span> name, tel;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> cout << <span style="color: #3933ff;">"이름과 전화번호를 입력해 주세요"</span> << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">for</span>(<span style="color: #931a68;">int</span> i=0;i<3;i++){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> cout << <span style="color: #3933ff;">"사람 "</span> << i+1 << <span style="color: #3933ff;">" : "</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> cin >> name >> tel;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #0326cc;">p</span>[i].set(name, tel);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">void</span> show(){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> cout << <span style="color: #3933ff;">"모든 사람의 이름은 "</span> << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">for</span>(<span style="color: #931a68;">int</span> i=0;i<3;i++){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> cout << <span style="color: #0326cc;">p</span>[i].getName() << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> cout << endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">void</span> search(){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #006141;">string</span> name;</p><p style="color: #3933ff; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> cout << </span>"전화번호 검색합니다. 이름을 입력하세요 >> "<span style="color: black;">;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> cin >> name;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">for</span>(<span style="color: #931a68;">int</span> i=0;i<3;i++){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">if</span>(name==<span style="color: #0326cc;">p</span>[i].getName()){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> cout << <span style="color: #3933ff;">"전화번호는 "</span> << <span style="color: #0326cc;">p</span>[i].getTel() << endl;</p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span>return<span style="color: black;">;</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> cout << <span style="color: #3933ff;">"없는 사람입니다. "</span><< endl;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> ~PersonManager(){ <span style="color: #4e9072;">//소멸자 구현</span></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #931a68;">delete</span> [] <span style="color: #0326cc;">p</span>;</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> }</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">};</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: #931a68;">int</span> main(<span style="color: #931a68;">int</span> argc, <span style="color: #931a68;">char</span> *argv[]){</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> <span style="color: #006141;">PersonManager</span> manager(3);</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> manager.show();</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"> manager.search();</p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; min-height: 15px; padding: 0px;"><br /></p><p style="color: #931a68; font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;"><span style="color: black;"> </span>return<span style="color: black;"> 0;</span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="font-family: Monaco; font-size: 11px; line-height: normal; margin: 0px; padding: 0px;">}</p><div style="line-height: 1.5;"><img alt="" class="_photoImage" data-lazy-src="" height="460" id="20151130_175/sin10120_1448889788894YWx3r_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.22.49.png" src="https://postfiles.pstatic.net/20151130_175/sin10120_1448889788894YWx3r_PNG/%BD%BA%C5%A9%B8%B0%BC%A6_2015-11-30_%BF%C0%C8%C4_10.22.49.png?type=w3" style="border: none; cursor: pointer;" width="548" /></div></div></div></div><div class="post_footer_contents" style="font-family: dotum; font-size: 12px; margin-bottom: 29px; min-height: 33px; position: relative;"><div class="wrap_tag" style="font-family: 나눔고딕, NanumGothic, NanumGothicWebFont, "Malgun Gothic", "맑은 고딕", Dotum, 돋움, Helvetica, "Apple SD Gothic Neo", sans-serif; margin: 0px 3px 0px 5px; padding: 0px; position: relative;"></div></div><div class="post-btn post_btn2" style="clear: both; font-family: 돋움, Dotum; font-size: 12px; height: 29px; line-height: 17px; margin-bottom: 2px; padding-bottom: 10px; padding-top: 15px; position: relative; z-index: 30;"><div class="wrap_postcomment" style="float: left; font-family: 나눔고딕, NanumGothic, NanumGothicWebFont, "Malgun Gothic", "맑은 고딕", Dotum, 돋움, Helvetica, "Apple SD Gothic Neo", sans-serif; letter-spacing: -0.5px; line-height: 29px; margin: 0px 0px 0px 5px;"></div></div>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-3756329405253361902015-03-31T13:30:00.001+09:002021-02-10T18:47:27.511+09:00클래스와 객체<p> <b style="color: #5f5e42; font-family: "1003773_10"; font-size: 10pt; text-align: justify;">1. 클래스 객체</b></p><div id="postViewArea"><div class="post-view pcol2 _param(1) _postViewArea220491020367" id="post-view220491020367" style="clear: both; color: #5f5e42; font-family: 돋움; font-size: 12px; line-height: 1.5; margin: 0px 0px 15px; overflow-wrap: break-word; overflow: auto hidden; padding: 15px 0px; position: relative; text-align: justify; width: 550px;"><div class="view" style="font-family: "1003773_10"; font-size: 10pt; line-height: 1.5;"><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b> [1]클래스</b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 객체를 만들어내기 위해 정의된 틀</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 클래스는 객체,실체가 아님</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 멤버 변수와 멤버 함수 선언</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b> [2]객체</b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 객체는 생성 될 때 클래스의 모양을 그대로 가지고 탄생</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"> 멤버 변수와 멤버 함수로 구성 </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 메모리에 생성, 실체(instance)라고도 부름</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 하나의 클래스 틀에서 찍어낸 여러 개의 객체 생성 가능</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 객체들은 상호 별도의 공간에 생성</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b>2. 클래스 구현 순서</b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b> [1]선언부</b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> class 키워드를 이용하여 클래스 선언</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 멤버 변수와 멤버 함수 선언 </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> (단, 멤버 변수는 클래스 선언 내에서 초기화 할수 없으며 멤버 함수는 원형 현태로 선언)</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> <b> [2]구현부</b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 클래스에 정의된 모든 멤버 함수 구현</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"><b>3. 객체생성방법</b></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"> donut,pizza,cake 예제코드</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"><br /></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"> Circle donut; // 도넛 객체 생성</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> Circle pizza; // 피자 객체 생성</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> Circle cake; // 케이스 객체 생성</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"><br /></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"><b>4. 객체의 멤버 변수, 함수 접근 방법</b></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"><b> (예제코드)</b></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"><b> </b>donut.radius = 1; // donut 객체의 radius 멤버에 1 기록</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"> </span>double area = donut.getArea(); // donut 객체의 면적 알아내기</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> pizza.radius = 30; // pizza 객체의 radius 멤버에 30 기록</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> area = pizza.getArea(); // pizza 객체의 면적 알아내기</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> cake.radius = 20; // cake 객체의 radius 멤버에 20기록</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> area = cake.getArea(); // cake 객체의 면적 알아내기</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"><br /></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"><b>5. c++의 파일 분리 방법 (.h,.cpp, main.cpp)</b></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b>getArea.h 에는 클래스 선언</b><b style="line-height: 1.5;"> </b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"><br /></span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">class Circle {</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>public:</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int radius; // 반지름</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>double getArea(); // 멤버함수 </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">};</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">class Rectangle {</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>public:</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int width;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int height;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int getArea();</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>bool isSquare();</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;">};</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b>getArea.cpp 에는 클래스 구현(단, 클래스 헤더 파일 include)</b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><u>#include "getArea.h" // width height radius</u></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">double Circle::getArea(){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 3.14 * radius * radius;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">Rectangle::getArea(){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return width*height;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">bool Rectangle::isSquare(){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (width == height)</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return true;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>else</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>false;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b>main.cpp 에는 전역 함수나 변수를 저장함(헤더 파일 include)</b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">#include <iostream></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><u>#include "getArea.h" //프로그래머가 만든 헤더 추가</u></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">using namespace std;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">int main(int argc, char** argv) {</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle donut;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>donut.radius=1;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>double area = donut.getArea();</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "donut의 면적은" << area << endl;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle pizza;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>pizza.radius = 30;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>area = pizza.getArea();</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "pizza의 면적은 " << area << endl;<span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle cake;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cake.radius =20;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>area = cake.getArea();</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "cake의 면적은" << area << endl;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Rectangle rect;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>rect.width = 5;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>rect.height = 5;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "사각형의 면적은 " << rect.getArea() << endl;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if(rect.isSquare()) cout << "rect는 정사각형입니다." << endl;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b>6. BankAccount 예제</b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">#include <iostream></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">#include "BankAccount.h"</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">using namespace std;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">int BankAccount::getAccountNumber(){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return accountNumber;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">string BankAccount::getOwner(){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return owner;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">int BankAccount::getBalance(){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return balance;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">void BankAccount::setAccountNumber(int maccountNumber){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>accountNumber = maccountNumber;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">void BankAccount::setOwner(string mowner){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>owner = mowner;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">void BankAccount::setBalance(int mbalance){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>balance = mbalance;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">void BankAccount::deposit(int amount){ // 입금하기: amount 금액만큼 잔액증가 </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>balance += amount; //balance=balance+amount;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">void BankAccount::withdraw(int amount){ // 출금하기: amount 금액만큼 잔액감소 </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>balance -= amount; //balance=balance-amount;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b><BankAccount.cpp></b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">#include "BankAccount.h"</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">#include <iostream></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">using namespace std;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">int main(int argc, char** argv){</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>BankAccount account;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>account.setBalance(0);</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>account.deposit(10000); //10000을 입금한다.</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "잔액은 " << account.getBalance()<<"원 입니다. " << endl; <span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>account.withdraw(2000); //2000원을 출금한다. </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "잔액은 " << account.getBalance()<<"원 입니다. " << endl;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</p><p style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b><main.cpp></b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">class BankAccount{</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>private: </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int accountNumber; // 계좌번호</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>string owner; // 예금주</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int balance; // 잔액</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>public:</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int getAccountNumber();<span class="Apple-tab-span" style="white-space: pre;"> </span>//accountNumber 접근자</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>string getOwner(); // owner 접근자</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int getBalance(); // balance 접근자 </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>void setAccountNumber(int maccountNumber);<span class="Apple-tab-span" style="white-space: pre;"> </span>//accountNumber 설정자 </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>void setOwner(string mowner); // owner 설정자</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>void setBalance(int mbalance); // balance 설정자</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>void deposit(int amount);</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>void withdraw(int amount); </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;">};</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><b><BankAccount.h></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><소스코드></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><br /></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="141" id="20150930_225/sin10120_1443624826196Qhms3_PNG/BankAccount%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150930_225/sin10120_1443624826196Qhms3_PNG/BankAccount%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="356" /></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><실행결과></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><br /></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><img alt="" class="_photoImage" data-lazy-src="" height="315" id="20151001_83/sin10120_1443684593423p5Jla_JPEG/v1%C1%D6%BC%AE.JPG" src="https://postfiles.pstatic.net/20151001_83/sin10120_1443684593423p5Jla_JPEG/v1%C1%D6%BC%AE.JPG?type=w3" style="border: none; cursor: pointer;" width="550" /></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><main.cpp><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="477" id="20151001_112/sin10120_14436845935884CD0k_JPEG/v1%C1%D6%BC%AE2.JPG" src="https://postfiles.pstatic.net/20151001_112/sin10120_14436845935884CD0k_JPEG/v1%C1%D6%BC%AE2.JPG?type=w3" style="border: none; cursor: pointer;" width="550" /></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><bankaccount.cpp><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="396" id="20151001_124/sin10120_1443684593821J9y9i_JPEG/v1%C1%D6%BC%AE3.JPG" src="https://postfiles.pstatic.net/20151001_124/sin10120_1443684593821J9y9i_JPEG/v1%C1%D6%BC%AE3.JPG?type=w3" style="border: none; cursor: pointer;" width="550" /></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><bankaccount.h></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><주석></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b>7.</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b>3.4 생성자</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> 1. 생성자를 사용하는 이유</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> </b>생성자 초기화를 위해</p><div style="line-height: 1.5;"><b style="line-height: 1.5;"> 2. 생성자가 실행되는 시점</b></div><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> </b>객체가 생성될때 자동으로 실행됨</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> 3. 생성자 함수이름</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"> 클래스 이름과 동일하게 짓는다</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> 4. 생성자가 자동으로 생성 : 기본생성자</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> </b>Circle donut처럼 매개변수가 없는 객체 생성할때 기본 생성자 자동으로 생성</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> 5. 생성자가 자동으로 생성되지 않는 경우</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> </b>생성자가 하나라도 만들어져 있으면 ex)pizza(30) 자동으로 만들지 않는다</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> 6. 예제3-4 소스코드, 실행결과, 주석</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> </b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> <소스코드></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#include <iostream></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">using namespace std;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">class Rectangle{</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">public:</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int width, height;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Rectangle();</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Rectangle(int w, int h);</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Rectangle(int length);</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>bool isSquare();</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">};</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">Rectangle::Rectangle(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>width = height = 1;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">Rectangle::Rectangle(int w, int h){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>width = w; height = h;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">Rectangle::Rectangle(int length){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>width = height = length;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">//정사각형이면 true를 리턴</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">bool Rectangle::isSquare(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if(width == height) return true;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>else return false;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">} </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">int main(int argc, char** argv) {</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Rectangle rect1;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Rectangle rect2(3,5);</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Rectangle rect3(3);</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if(rect1.isSquare()) cout <<"rect1은 정사각형이다."<<endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if(rect2.isSquare()) cout <<"rect2은 정사각형이다."<<endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if(rect3.isSquare()) cout <<"rect3은 정사각형이다."<<endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><div align="center" style="line-height: 1.5; text-align: center;"><b style="line-height: 1.5;"><img alt="" class="_photoImage" data-lazy-src="" height="148" id="20151008_79/sin10120_1444248039789nDCQp_PNG/rect_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20151008_79/sin10120_1444248039789nDCQp_PNG/rect_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="331" /></b></div><b style="text-align: center;"><div align="center" style="line-height: 1.5;"><b style="line-height: 1.5;"><실행결과></b></div></b><b><div style="line-height: 1.5; text-align: center;"> </div></b><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="711" id="20151008_251/sin10120_1444248039934o8NLD_PNG/rect_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20151008_251/sin10120_1444248039934o8NLD_PNG/rect_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="511" /></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b style="text-align: justify;"><주석></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b>8.소멸자</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b> 1.프로그램 3-5 소스,실행결과</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#include <iostream></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">using namespace std;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">class Circle {</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>public:</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int radius;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle();</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle(int r);</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>~Circle(); //소멸자 선언</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>double getArea();</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>};</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle::Circle(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>radius=1;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "반지름" << radius << "원 생성" << endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle::Circle(int r){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>radius=r;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "반지름" << radius << "원 생성" << endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle::~Circle(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "반지름" << radius << "원 소멸" << endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>double Circle::getArea(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 3.14*radius*radius;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">int main(int argc, char** argv) {</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle donut;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle pizza(30);</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><소스코드></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><img alt="" class="_photoImage" data-lazy-src="" height="167" id="20151008_185/sin10120_1444289659442mWhHK_PNG/3-5_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20151008_185/sin10120_1444289659442mWhHK_PNG/3-5_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="334" /> </p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><실행결과></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><img alt="" class="_photoImage" data-lazy-src="" height="473" id="20151008_119/sin10120_1444289659635EonT0_PNG/3-5_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20151008_119/sin10120_1444289659635EonT0_PNG/3-5_%C1%D6%BC%AE.PNG?type=w3" style="border: none rgb(0, 0, 0); cursor: pointer;" width="490" /></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><주석></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b>2. 소멸자 실행 : 객체 자동, ~을 붙임으로써 만듬</b></p><p align="justify" style="line-height: 1.5; margin: 0px 0px 0px 80px; padding: 0px;"><b> 소멸자 오직 한개만 존재 => 6개생성</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b>3. 소멸자 순서 : 실행의 역순</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b>4. 전역객체 main()함수 밖 -> 프로그램 실행 전 영역 미리 할당</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b>5. 프로그램 3-6 소스, 결과</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#include <iostream></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">using namespace std;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">class Circle{</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>public:</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int radius;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle();</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle(int r);</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>~Circle();</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>double getArea();</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>};</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle::Circle(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>radius=1;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "반지름 " << radius << " 원 생성" << endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle::Circle(int r){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>radius = r;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "반지름 " << radius << " 원 생성" << endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle::~Circle(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "반지름 " << radius << " 원 소멸" << endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>double Circle::getArea(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 3.14*radius*radius;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle globalDonut(1000); //전역 객체 생성 </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle globalPizza(2000); //전역 객체 생성 </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>void f(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle fDonut(100); // 지역 객체 생성 </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle fPizza(200); // 지역 객체 생성 </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">int main() {</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle mainDonut; //지역 객체 생성</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Circle mainPizza(30); //지역 객체 생성</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>f();</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><소스코드></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="265" id="20151008_116/sin10120_1444290771741UtdY4_PNG/3-6_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20151008_116/sin10120_1444290771741UtdY4_PNG/3-6_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="258" /></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><실행결과></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br style="clear: both;" /> </b></p><div align="center" style="line-height: 1.5; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="605" id="20151008_213/sin10120_1444290772024JAwj6_PNG/3-6_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20151008_213/sin10120_1444290772024JAwj6_PNG/3-6_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="508" /></b></div><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><주석></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b>6. 프로그램 3-9 소스, 결과</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><main3></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#include "Calculator.h"</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">int main() {</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Calculator calc; // calc 객체 생성</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>calc.run(); //계산기 시작 </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><Adder.h></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#ifndef ADDER_H</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#define ADDER_H</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">class Adder {//덧셈 모듈 클래스</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int op1, op2;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>public:</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Adder(int a, int b);</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int process(); </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">};</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#endif</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><Adder.cpp></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#include "Adder.h"</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">Adder::Adder(int a, int b){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>op1 = a; op2 = b;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">int Adder::process(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return op1 + op2;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><Calculator.h></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#ifndef CALCULATOR_H</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#define CALCULATOR_H</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">class Calculator { //계산기 클래스</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">public:</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>void run(); </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">};</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#endif</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><Calculator.cpp></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#include <iostream></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">using namespace std;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#include "Calculator.h"</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#include "Adder.h"</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">void Calculator::run(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "두 개의 수를 입력하세요>>";</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int a, b;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cin >> a >> b; //정수 두 개 입력 </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Adder adder(a, b); //덧셈기 생성</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << adder.process(); //덧셈 계산 </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><소스코드,주석></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="118" id="20151008_51/sin10120_1444293777326EuIE5_PNG/3-9_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20151008_51/sin10120_1444293777326EuIE5_PNG/3-9_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="333" /> </b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><실행결과></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b>7. 실습문제 1-Tower()클래스 소스코드,실행결과</b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><br /></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">#include <iostream></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">using namespace std;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">class Tower{</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int height;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>public:</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Tower() { height = 1; }</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Tower(int h);</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int getHeight();</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">};</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">Tower::Tower(int h){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>height = h;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">int Tower::getHeight(){</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return height;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">int main() {</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Tower myTower; //1미터</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Tower seoulTower(100); // 100미터</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "높이는 " << myTower.getHeight() << "미터" <<endl;</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "높이는 " << seoulTower.getHeight() << "미터" << endl; </p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;">}</p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px;"><b><소스코드></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="132" id="20151008_284/sin10120_1444294422005nuog1_PNG/%BD%C7%BD%C0%B9%AE%C1%A61_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20151008_284/sin10120_1444294422005nuog1_PNG/%BD%C7%BD%C0%B9%AE%C1%A61_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="339" /> </b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><실행결과></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="322" id="20151008_102/sin10120_1444294422252J0y4x_PNG/%BD%C7%BD%C0%B9%AE%C1%A61_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20151008_102/sin10120_1444294422252J0y4x_PNG/%BD%C7%BD%C0%B9%AE%C1%A61_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="550" /></b></p><p align="center" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><주석></b></p><p align="justify" style="line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><br /></b></p></div></div></div><div class="post_footer_contents" style="font-family: dotum; font-size: 12px; margin-bottom: 29px; min-height: 33px; position: relative;"><div class="wrap_tag" style="font-family: 나눔고딕, NanumGothic, NanumGothicWebFont, "Malgun Gothic", "맑은 고딕", Dotum, 돋움, Helvetica, "Apple SD Gothic Neo", sans-serif; margin: 0px 3px 0px 5px; padding: 0px; position: relative;"></div></div><div class="post-btn post_btn2" style="clear: both; font-family: 돋움, Dotum; font-size: 12px; height: 29px; line-height: 17px; margin-bottom: 2px; padding-bottom: 10px; padding-top: 15px; position: relative; z-index: 30;"><div class="wrap_postcomment" style="float: left; font-family: 나눔고딕, NanumGothic, NanumGothicWebFont, "Malgun Gothic", "맑은 고딕", Dotum, 돋움, Helvetica, "Apple SD Gothic Neo", sans-serif; letter-spacing: -0.5px; line-height: 29px; margin: 0px 0px 0px 5px;"><div class="area_sympathy pcol2" id="area_sympathy220491020367" style="color: #5f5e42; float: left; font-size: 0px; height: 29px; margin-right: 5px; position: relative;">` <div class="u_likeit_list_module _reactionModule" data-catgid="post" data-cid="sin10120_220491020367" data-did="BLOG" data-facetype="0" data-loaded="1" data-sid="BLOG" style="display: inline-block; position: relative; vertical-align: top; visibility: visible; z-index: 1;"><a aria-pressed="false" class="u_likeit_list_btn _button pcol2 _param(220491020367) off" data-ishiddencount="true" data-log="lik.llike|lik.lunlike" data-type="like" href="https://blog.naver.com/PostView.nhn?blogId=sin10120&logNo=220491020367&parentCategoryNo=&categoryNo=37&viewDate=&isShowPopularPosts=false&from=postView#" role="button" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; color: #5f5e42; display: inline-block; float: none; font-family: normal; letter-spacing: 0px; line-height: normal; list-style: none; margin: 0px; overflow: visible; padding: 0px; position: static; text-decoration-line: none; vertical-align: top;"><span class="u_ico _icon pcol3" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; color: #f13300; display: inline-block; float: none; font-size: 13px; letter-spacing: 0px; line-height: 29px; list-style: none; margin: 0px; overflow: visible; padding: 0px 0px 0px 5px; position: static; vertical-align: top;"></span></a></div> <a class="btn_arr pcol2 _symList _param(3|1|220491020367|0) _returnFalse" href="https://blog.naver.com/PostView.nhn?blogId=sin10120&logNo=220491020367&parentCategoryNo=&categoryNo=37&viewDate=&isShowPopularPosts=false&from=postView#" id="Sympathy220491020367" role="button" style="color: #5f5e42; display: inline-block; height: 29px; padding-left: 3px; position: relative; text-decoration-line: none; vertical-align: top; z-index: 10;"><div class="u_likeit_list_module _reactionModule" data-catgid="post" data-cid="sin10120_220491020367" data-did="BLOG" data-facetype="0" data-loaded="1" data-sid="BLOG" style="display: inline-block; position: relative; vertical-align: top; visibility: visible; z-index: 1;"><span aria-pressed="false" class="u_likeit_list_btn _button btn_sympathy pcol2 off" data-type="like" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; display: inline-block; float: none; font-family: normal; letter-spacing: 0px; line-height: normal; list-style: none; margin: 0px; overflow: visible; padding: 0px; position: static; vertical-align: top;"><span class="u_txt _label" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; display: inline-block; float: none; font-family: 나눔고딕, NanumGothic, NanumGothicWebFont, "Malgun Gothic", "맑은 고딕", Dotum, 돋움, Helvetica, "Apple SD Gothic Neo", sans-serif; font-size: 12px; letter-spacing: 0px; line-height: 29px; list-style: none; margin: 0px 3px 0px 0px; padding: 0px; position: static; vertical-align: top;">공감</span> <span class="u_cnt _count" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; display: inline-block; float: none; font-family: 나눔고딕, NanumGothic, NanumGothicWebFont, "Malgun Gothic", "맑은 고딕", Dotum, 돋움, Helvetica, "Apple SD Gothic Neo", sans-serif; font-size: 12px; letter-spacing: 0px; line-height: 29px; list-style: none; margin: 0px; padding: 0px; position: static; vertical-align: top;">0</span></span></div> <i class="aline bar" style="border-style: solid; border-width: 0px 1px 0px 0px; display: inline-block; height: 13px; inset: 0px; margin-top: 8px; opacity: 0.2; overflow: hidden; padding-left: 5px; position: static; vertical-align: top; width: 0px;"></i> <i class="bu_arr" style="display: inline-block; font-size: 10px; padding: 0px 0px 0px 1px; transform: scale(0.5, 0.5); vertical-align: top;"></i></a></div><div><br /></div></div></div>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-83066941323061595292015-03-24T13:30:00.002+09:002021-02-10T18:45:53.968+09:00실습문제<p> <b style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; text-align: justify;">C언어 복습</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b>1. 조건문</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b> [1] if</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> //조건문-if문 형식1 : if... else.... </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> int age = 20 ; // 20세</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>if(age<=19) //19세 이하일경우 출력 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>{</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>cout << "미성년자입니다.\n";</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">else // 19세 이하가 아닐경우 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">{</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>cout << "성인입니다\n";</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><img alt="" class="_photoImage" data-lazy-src="" height="118" id="20150918_155/sin10120_1442502039783jx0m6_PNG/%C1%B6%B0%C7%B9%AE_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150918_155/sin10120_1442502039783jx0m6_PNG/%C1%B6%B0%C7%B9%AE_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="308" /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><실행결과><br style="clear: both;" /><br style="clear: both;" /></b><img alt="" class="_photoImage" data-lazy-src="" height="333" id="20150918_123/sin10120_1442502039941mCsm4_PNG/%C1%B6%B0%C7%B9%AE_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150918_123/sin10120_1442502039941mCsm4_PNG/%C1%B6%B0%C7%B9%AE_%C1%D6%BC%AE.PNG?type=w3" style="border: none rgb(0, 0, 0); cursor: pointer;" width="325" /> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><주석></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><br /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><br /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b> [1]-1 if문 형식2</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> int age=19;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> //조건문-if문 형식2 : if... elseif....else... </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> if (age<=18){</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> <span class="Apple-tab-span" style="white-space: pre;"></span>cout <<"미성년자입니다\n"; // 18세 이하 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> }</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> else if(age==19){</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> <span class="Apple-tab-span" style="white-space: pre;"></span>cout <<"아쉽네요\n"; // 18세 초과인 경우중 19세인경우 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>else</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>{</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>cout<<"성인입니다\n"; // 20세 이상 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="137" id="20150918_140/sin10120_1442502636738li6Aa_PNG/%C1%B6%B0%C7%B9%AE_1_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150918_140/sin10120_1442502636738li6Aa_PNG/%C1%B6%B0%C7%B9%AE_1_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="328" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><실행결과></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="319" id="20150918_260/sin10120_1442502647692Ix7ts_PNG/%C1%B6%B0%C7%B9%AE_1_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150918_260/sin10120_1442502647692Ix7ts_PNG/%C1%B6%B0%C7%B9%AE_1_%C1%D6%BC%AE.PNG?type=w3" style="border: none rgb(0, 0, 0); cursor: pointer;" width="501" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><주석></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> <b> [2] switch</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> int score = 2; //score선언 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>switch( score )</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>{</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>case 0: //score=0</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>cout << "밀려 쓰셨군요~\n";</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>break;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>case 1: //score=1</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span> cout << "조금 더 노력하세요~\n";</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>break;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>case 2: //score=2</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span> cout << "안타깝네요\n";</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>break;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>case 3: //score=3</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span> cout << "멋있어요~\n";</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>break;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> }</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="138" id="20150918_209/sin10120_1442502811863ukAt0_PNG/switch_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150918_209/sin10120_1442502811863ukAt0_PNG/switch_%B0%E1%B0%FA.PNG?type=w3" style="border: none rgb(0, 0, 0); cursor: pointer;" width="419" /><br style="clear: both;" /><실행결과><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="408" id="20150918_144/sin10120_14425028119896CLke_PNG/switch_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150918_144/sin10120_14425028119896CLke_PNG/switch_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="360" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><주석></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b>2. 반복문</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b> [1]for</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> int sum=0; </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>int i; </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>//반복문 -for 문 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> for (i=1; i<=10; i++)</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> sum+=i; </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> cout << "현재 i의 값 = " << i << endl; </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> cout << "1~10까지의 합 = " << sum << endl; </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><img alt="" class="_photoImage" data-lazy-src="" height="172" id="20150918_119/sin10120_1442503009195X3HS8_PNG/for_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150918_119/sin10120_1442503009195X3HS8_PNG/for_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="423" /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><실행결과><br style="clear: both;" /></b><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="275" id="20150918_91/sin10120_14425030093089WJ7Q_PNG/for_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150918_91/sin10120_14425030093089WJ7Q_PNG/for_%C1%D6%BC%AE.PNG?type=w3" style="border: none rgb(0, 0, 0); cursor: pointer;" width="461" /> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><주석></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b> [2]while</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> int i=1; //1. 초기값 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>int sum=0;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>while (i<=10) //2. 조건식 (i가 10이하일때까지) </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>{</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>sum+=i;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>i++; //3. 증감식 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> }</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> cout << "현재 i의 값 = " << i << endl;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> cout << "1~10까지의 합 = "<< sum << endl; </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="137" id="20150918_81/sin10120_1442503144577chabY_PNG/while_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150918_81/sin10120_1442503144577chabY_PNG/while_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="333" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><실행결과></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="301" id="20150918_10/sin10120_1442503152578rh7tE_PNG/while_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150918_10/sin10120_1442503152578rh7tE_PNG/while_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="444" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><주석></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><br /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b> [3]do-while</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> int i=1; //초기값 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> int sum=0; //초기값 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> do</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>sum+=i; //sum값에 i를 더함 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>i++; // i 1씩 증가 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> } while(i<=10); //i가10이하일때까지 실행 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> cout << "현재 i의 값 = " << i << endl;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> cout << "1~10까지의 합 = " << sum << endl;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="203" id="20150918_19/sin10120_1442503333395zDlrR_PNG/do_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150918_19/sin10120_1442503333395zDlrR_PNG/do_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="431" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><실행결과></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="292" id="20150918_264/sin10120_1442503342493WNVMS_PNG/do_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150918_264/sin10120_1442503342493WNVMS_PNG/do_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="402" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><주석></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><br /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b>3. 기타제어문</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b> [1]continue문</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <string></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int i;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">for (i=1; i<=10; i++) </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">{</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> if(i==5) continue; </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> cout << "i의 값 = " << i << endl;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="307" id="20150918_238/sin10120_1442503798150h41rG_PNG/continue_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150918_238/sin10120_1442503798150h41rG_PNG/continue_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="361" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><실행결과></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="236" id="20150918_59/sin10120_1442503805953DHiNT_PNG/continue_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150918_59/sin10120_1442503805953DHiNT_PNG/continue_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="550" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><주석></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><br /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><br /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b> [2]break문</b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <string></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> for (int i= 1; i<=10; i++)//i가 1부터 10이 될때까지 실행 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> {</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> <span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>if (i==5)</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>break; //i가 5인 경우는 반복문을 빠져나감.</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"></span>cout << " i의 값 = " << i << '\n'; //결과출력 </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><br /></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="184" id="20150918_274/sin10120_1442503949840g66te_PNG/break_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150918_274/sin10120_1442503949840g66te_PNG/break_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="311" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><실행결과></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="340" id="20150918_153/sin10120_1442503958054Ttng4_PNG/break_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150918_153/sin10120_1442503958054Ttng4_PNG/break_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="484" /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><주석></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong>2장 실습문제</strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong>1. 1~100까지의 정수출력</strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream><br />using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {<br /> <br /> <br /> //1번<br /> int i;<br /> for(i=1; i<=100; i++){<br /> cout << i;<br /> if(i%10 == 0)<br /> cout << endl;<br /> else<br /> cout << '\t';<br /> }<br /> <br /> <br /> <br /> return 0; <br />}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><소스코드></strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><br /></strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="260" id="20150923_269/sin10120_1442940113385Xa7B5_PNG/1%B9%F8_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150923_269/sin10120_1442940113385Xa7B5_PNG/1%B9%F8_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="550" /></strong></p><div align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; text-align: center;"><strong><실행결과></strong></div><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong style="line-height: 1.5;"><br /></strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="352" id="20150923_274/sin10120_1442940113580cCX44_PNG/1%B9%F8_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150923_274/sin10120_1442940113580cCX44_PNG/1%B9%F8_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="530" /></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><주석></strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong>2. 구구단 출력</strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream><br />using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {<br /> <br /> //2번<br /> int i,j;<br /> for(i=1;i<10;i++) {<br /> for(j=1;j<10;j++){<br /> cout << j << 'x' << i << '=' << j*i << '\t';<br /> }<br /> cout << endl;<br /> }<br /> return 0; <br />}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><br /></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><img alt="" class="_photoImage" data-lazy-src="" height="266" id="20150923_153/sin10120_1442940340363SjRXa_PNG/2%B9%F8_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150923_153/sin10120_1442940340363SjRXa_PNG/2%B9%F8_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="550" /></b></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><실행결과></b></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="233" id="20150923_56/sin10120_1442940346927QeEip_PNG/2%B9%F8_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150923_56/sin10120_1442940346927QeEip_PNG/2%B9%F8_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="550" /></b></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><주석></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b> </b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong>3. 두 개의 정수중 큰 수 출력<br /></strong>#include <iostream><br />using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {<br /> <br /> //3번<br /> int a, b;<br /> cout << "두 수를 입력하라>>";<br /> cin >> a >> b;<br /> cout << "큰 수 = ";<br /> if(a>b)<br /> cout << a << endl;<br /> else<br /> cout << b << endl;<br /> <br /> return 0; <br />}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><소스코드></b></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><b><br /></b></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="155" id="20150923_287/sin10120_1442940420293RKmlN_PNG/3%B9%F8_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150923_287/sin10120_1442940420293RKmlN_PNG/3%B9%F8_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="328" /></b></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><실행결과></b></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><img alt="" class="_photoImage" data-lazy-src="" height="308" id="20150923_61/sin10120_144294042685330r9F_PNG/3%B9%F8_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150923_61/sin10120_144294042685330r9F_PNG/3%B9%F8_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="323" /> </b></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b><주석></b></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><b></b> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong></strong> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong>4.입력받은 두 개의 문자열이 같으면 "같습니다", 아니면 "같지않습니다."를 출력<br /></strong>#include <iostream><br />#include <cstring><br />using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {<br /> <br /> //4번<br /> char password1[100];<br /> char password2[100];<br /> cout << "새 암호를 입력하세요>> ";<br /> cin >> password1;<br /> cout << "새 암호를 다시 한 번 입력하세요>> ";<br /> cin >> password2;<br /> <br /> if (strcmp(password1, password2) == 0)<br /> cout << "같습니다. \n";<br /> <br /> else<br /> cout << "같지 않습니다. \n";<br /> <br /> cout << endl;<br /> <br /> return 0; <br />} </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><소스코드></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="194" id="20150923_90/sin10120_1442940561704CstLp_PNG/4%B9%F8_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150923_90/sin10120_1442940561704CstLp_PNG/4%B9%F8_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="335" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="198" id="20150923_229/sin10120_1442940561836DxQHI_PNG/4%B9%F8_%B0%E1%B0%FA1.PNG" src="https://postfiles.pstatic.net/20150923_229/sin10120_1442940561836DxQHI_PNG/4%B9%F8_%B0%E1%B0%FA1.PNG?type=w3" style="border: none; cursor: pointer;" width="343" /> </strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><실행결과></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="410" id="20150923_80/sin10120_1442940571743cvdif_PNG/4%B9%F8_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150923_80/sin10120_1442940571743cvdif_PNG/4%B9%F8_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="534" /></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><주석></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong></strong> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong>5. yes가 입력되면 종료되는 프로그램<br /></strong>#include <iostream><br />#include <cstring> //strcmp<br />using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {<br /> <br /> //5번<br /> char yes[100];<br /> while(true){<br /> cout << "종료하고 싶으면 yes를 입력하세요>> ";<br /> cin.getline(yes, 100); //cin.getline(yes, 100, '\n');<br /> if (strcmp(yes, "yes")==0)<br /> break;<br /> <br /> }<br /> cout << "종료합니다...." << endl;<br /> <br /> return 0;<br />}</p><p align="left" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px;"><strong><소스코드></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="197" id="20150923_187/sin10120_1442940722337RDAmh_PNG/5%B9%F8_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150923_187/sin10120_1442940722337RDAmh_PNG/5%B9%F8_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="340" /></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><실행결과></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="351" id="20150923_27/sin10120_1442940730731CjVl5_PNG/5%B9%F8_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150923_27/sin10120_1442940730731CjVl5_PNG/5%B9%F8_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="550" /></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><주석></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong></strong> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong>6. 이름,주소,나이 입력받아 출력</strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream><br />#include <cstring><br />using namespace std;<br />int main(int argc, char** argv) {<br /> <br /> //6번<br /> char name1[100];<br /> char address[100] ;<br /> int age;<br /> <br /> cout << "이름은? ";<br /> cin.getline(name1,100);<br /> cout << "주소는? ";<br /> cin.getline(address,100);<br /> cout << "나이는? ";<br /> cin >> age;<br /> <br /> cout << name1 << "," << address << "," << age << "세" << endl;<br /> <br /> return 0;<br />}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><소스코드></strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><br /></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="190" id="20150923_101/sin10120_14429408489854AIOg_PNG/6%B9%F8_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150923_101/sin10120_14429408489854AIOg_PNG/6%B9%F8_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="291" /> </strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><실행결과></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="323" id="20150923_245/sin10120_1442940857407GevoM_PNG/6%B9%F8_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150923_245/sin10120_1442940857407GevoM_PNG/6%B9%F8_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="550" /></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><주석></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong></strong> </p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong>7. 5칙연산(+,-,*,/,%)을 하는 프로그램</strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">#include <iostream><br />#include <cstring><br />#include <cstdlib> // system("cls"); 화면지우기<br />using namespace std;</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {<br /> <br /> //7번<br /> char opcode;<br /> int left, right, result;<br /> while (true){<br /> cout << "부호를 입력하세요 (종료:q) : ";<br /> cin >> opcode;<br /> if(opcode == 'q')<br /> break;<br /> <br /> cout << "숫자1입력 : ";<br /> cin >> left;<br /> cout << "숫자2입력 : ";<br /> cin >> right;<br /> <br /> switch (opcode)<br /> {<br /> case '+':<br /> result = left + right;<br /> break;<br /> case '-':<br /> result = left - right;<br /> break;<br /> case '*':<br /> result = left * right;<br /> break;<br /> case '/':<br /> if(right==0){<br /> cout << "0으로 나눈 오류발생!" << endl;<br /> return -1; // -1은 0으로 나누는 오류임을 표시함<br /> }<br /> else<br /> result = left / right;<br /> <br /> break;<br /> <br /> case '%':<br /> result = left % right;<br /> break;<br /> default:<br /> cout << "잘못된 연산자" << endl;<br /> }<br /> <br /> cout << result << endl;<br /> <br /> system("pause"); //화면을 멈추고<br /> system("cls"); //화면정리<br /> <br /> }<br />}</p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><소스코드></strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><br /></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="204" id="20150923_88/sin10120_1442941167068OfvDm_PNG/7%B9%F8_%B0%E1%B0%FA.PNG" src="https://postfiles.pstatic.net/20150923_88/sin10120_1442941167068OfvDm_PNG/7%B9%F8_%B0%E1%B0%FA.PNG?type=w3" style="border: none; cursor: pointer;" width="356" /><br style="clear: both;" /><br style="clear: both;" /><img alt="" class="_photoImage" data-lazy-src="" height="137" id="20150923_7/sin10120_14429411672195lrER_PNG/7%B9%F8_%B0%E1%B0%FA1.PNG" src="https://postfiles.pstatic.net/20150923_7/sin10120_14429411672195lrER_PNG/7%B9%F8_%B0%E1%B0%FA1.PNG?type=w3" style="border: none; cursor: pointer;" width="331" /> </strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><실행결과></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><img alt="" class="_photoImage" data-lazy-src="" height="869" id="20150923_276/sin10120_1442941175246KoA4n_PNG/7%B9%F8_%C1%D6%BC%AE.PNG" src="https://postfiles.pstatic.net/20150923_276/sin10120_1442941175246KoA4n_PNG/7%B9%F8_%C1%D6%BC%AE.PNG?type=w3" style="border: none; cursor: pointer;" width="462" /></strong></p><p align="center" style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: center;"><strong><주석></strong></p><p style="color: #5f5e42; font-family: "1003773_10"; font-size: 13.3333px; line-height: 1.5; margin: 0px; padding: 0px; text-align: justify;"><strong><br /> </strong></p>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-73042675394950585522015-03-17T16:05:00.002+09:002021-02-10T18:37:09.144+09:00C++ 프로그래밍의 기본<p> <b style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px;">1. 화면출력(예제2-1)</b><span style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px;">,소스코드,실행결과,주석(헤더파일,출력,네임스페이스 개념,사용법)</span></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b style="text-align: justify;"><소스코드></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b style="text-align: justify;"><br style="margin: 0px; padding: 0px;" /></b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">#include <iostream></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">using namespace std;</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">int main(int argc, char** argv) {</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> std::cout<<"Hello\n";</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> std::cout<<"첫 번째 맛보기입니다.";</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0; </p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">}</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><br style="margin: 0px; padding: 0px;" /></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"> <img class="__se_object" height="147" id="se_object_1612937202761" imgqe="true" jsonvalue="%7B%7D" rheight="147px" rwidth="492px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150910_126/sin10120_14418724992732tm4y_PNG/%B0%E1%B0%FA.PNG" style="border-color: rgb(0, 0, 0); height: 147px; width: 492px;" width="492" /> </p><div align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; text-align: center;"><span style="line-height: 1.5;"><b><실행결과></b></span></div><div align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; text-align: center;"><span style="line-height: 1.5;"><br style="margin: 0px; padding: 0px;" /></span></div><div align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; text-align: center;"><span style="line-height: 1.5;"> <img class="__se_object" height="160" id="se_object_1612937180640" imgqe="true" jsonvalue="%7B%7D" rheight="160px" rwidth="510px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150910_232/sin10120_14418729451356koIQ_PNG/%C1%D6%BC%AE2.PNG" style="height: 160px; width: 510px;" width="510" /></span></div><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><주석></b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><br style="margin: 0px; padding: 0px;" /></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">std : C++ 표준 라이브러리에 선언된 모든 이름을 포함하는 C++ 표준 이름 공간</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">출력 명령어 : cout</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">네임스페이스 : 새로운 이름 공간을 사용할 때 사용하는 키워드</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">네임스페이스 사용법: 예) using namespace std;</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b>2. 키 입력 받기 예제(예제2-3)</b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><소스코드></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">#include <iostream> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">using namespace std;</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">int main(int argc, char** argv) {</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cout<< "너비를 입력하세요>>";</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> int width;</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cin >> width; </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cout << "높이를 입력하세요>>";</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> int height;</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cin >> height; </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> int area = width*height ; </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cout<< "면적은 "<< area << "\n"; </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0; </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">}</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><div align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; text-align: center;"><b style="line-height: 1.5;"><img class="__se_object" height="119" id="se_object_1612937234625" imgqe="true" jsonvalue="%7B%7D" rheight="119px" rwidth="431px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150910_300/sin10120_1441874577003YYjA0_PNG/%B0%E1%B0%FA.PNG" style="border-color: rgb(0, 0, 0); height: 119px; width: 431px;" width="431" /></b></div><b style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px;"><div align="center" style="text-align: center;"><b style="line-height: 1.5;"><실행결과></b></div></b><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 18px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center; widows: 1;"> </p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 18px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center; widows: 1;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"> </p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 18px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center; widows: 1;"><b><img class="__se_object" height="345" id="se_object_1612937172206" imgqe="true" jsonvalue="%7B%7D" rheight="346px" rwidth="550px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150910_45/sin10120_1441874577266OXSUW_PNG/%C1%D6%BC%AE.PNG" style="height: 345px; width: 548px;" width="548" /></b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 18px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center; widows: 1;"><b><span style="color: white;"><주석></span></b><b style="line-height: 1.5;"><주석></b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><b>3. C++ 문자열처리</b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> <b>[1] C-스트링 ( C언어) </b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> <span style="line-height: 1.5;"> ‘\0’로 끝나는 문자 배열</span></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> 1) 배열선언 </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span style="line-height: 1.5;"> char로 배열을 선언함 </span></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> 2) 배열이름(=시작주소)</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> ex. char name1[6];</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><br style="margin: 0px; padding: 0px;" /></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b>(예제1) 예제 2-4</b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">#include <iostream></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">using namespace std;</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><br style="margin: 0px; padding: 0px;" /></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">int main(){</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "이름을 입력하세요>> ";</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span>char name[11]; </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cin >> name; </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "이름은 " << name << "입니다\n"; </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">}</p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><소스코드></b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><b><img class="__se_object" height="411" id="se_object_1612937221080" imgqe="true" jsonvalue="%7B%7D" rheight="413px" rwidth="550px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150917_162/sin10120_1442476822339WUYLE_JPEG/%BF%B9%C1%A62-4%B0%E1%B0%FA.JPG" style="border-color: rgb(0, 0, 0); height: 411px; width: 548px;" width="548" /></b></p><div align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; text-align: center;"><b><b style="line-height: 1.5;"><실행결과></b></b></div><b style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px;"><br style="clear: both; margin: 0px; padding: 0px;" /><img class="__se_object" height="249" id="se_object_1612937214717" imgqe="true" jsonvalue="%7B%7D" rheight="250px" rwidth="550px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150917_98/sin10120_1442476822496c49vm_JPEG/%BF%B9%C1%A62-4%C1%D6%BC%AE.JPG" style="border-color: rgb(0, 0, 0); height: 249px; width: 548px;" width="548" /></b><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"> </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> </p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><주석></b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><b>(예제2) 예제 2-5</b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">#include <iostream></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">#include <cstring></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">using namespace std;</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">int main(int argc, char** argv) {</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span>char password[11];</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "프로그램을 종료하려면 암호를 입력하세요." << endl;</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span>while(true) {</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cout << "암호>>";</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cin >> password; </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span> if(strcmp(password, "C++") == 0{ // strcmp ( , ) <-- 내용비교 해서 같으면 0 출력됨 </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span> cout << "프로그램을 정상 종료합니다." << endl;</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span> break;</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">}</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><br style="margin: 0px; padding: 0px;" /></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">else</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><br style="margin: 0px; padding: 0px;" /></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> cout << "암호가 틀립니다~~" << endl; </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">}</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"> </p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;">}</p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><br style="margin: 0px; padding: 0px;" /></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><소스코드></b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><img class="__se_object" height="309" id="se_object_1612937241114" imgqe="true" jsonvalue="%7B%7D" rheight="309px" rwidth="389px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150917_105/sin10120_1442477630324OENy1_PNG/%BF%B9%C1%A62-5%B0%E1%B0%FA.PNG" style="height: 309px; width: 389px;" width="389" /><br style="clear: both; margin: 0px; padding: 0px;" /><실행결과><br style="clear: both; margin: 0px; padding: 0px;" /><img class="__se_object" height="349" id="se_object_1612937166799" imgqe="true" jsonvalue="%7B%7D" rheight="350px" rwidth="550px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150917_270/sin10120_1442477630556xhDyS_PNG/%BF%B9%C1%A62-5%C1%D6%BC%AE.PNG" style="height: 349px; width: 548px;" width="548" /></b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"> </p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><주석></b></p><p align="justify" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: justify;"><b> </b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> [2] String 클래스(권장)</b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> <string> 헤더 파일에 선언됨</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> 다양한 멤버 함수 제공, 문자열 비교, 복사, 수정 등</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> <b> 예제 2-7</b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">#include <iostream></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">#include <string></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">using namespace std;</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">int main(){</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> string song("Falling in love with you"); // 문자열 song</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> string elvis("Elvis Presley"); //문자열 elvis</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> string singer; //문자열 singer</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> cout << song + "를 부른 가수는"; // + 로 문자열 연결</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> cout << "(힌트 : 첫글자는 " <<elvis[0] << ")?"; //[] 연산자 사용</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> getline(cin, singer);//문자열 입력</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> if(singer == elvis) // 조건문, elvis presley 일경우 </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> cout << "맞았습니다.";</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> else</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> cout << "틀렸습니다. " + elvis + "입니다."<< endl; // +로 문자열 연결 </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> return 0; </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">}</p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><소스코드></b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><img class="__se_object" height="85" id="se_object_1612937173558" imgqe="true" jsonvalue="%7B%7D" rheight="85px" rwidth="507px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150917_287/sin10120_1442479892126GXwID_PNG/%BF%B9%C1%A62-7%B0%E1%B0%FA.PNG" style="height: 85px; width: 507px;" width="507" /> </b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><실행결과></b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><img class="__se_object" height="325" id="se_object_1612937247817" imgqe="true" jsonvalue="%7B%7D" rheight="326px" rwidth="550px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150917_53/sin10120_1442479898359kuCjg_PNG/%BF%B9%C1%A62-7%C1%D6%BC%AE.PNG" style="height: 325px; width: 548px;" width="548" /></b></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><주석></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b>4. cin.getline()예제 (예제2-6) 소스코드, 실행결과,필요성</b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> @cin.getline() 의 필요성</b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> cin으로 배열을 입력받을때 띄어쓰기를 하면 그 배열이 끝난걸로 처리됨.</b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> 그러나 cin.getline()을 사용하면 띄어쓰기를 해도 같은 한 배열로 인식한다.</b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> 이를통해 중간에 띄어쓰기가 된 주소 입력이나 긴 이름 등을 입력 받을 수 있다.</b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> </b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> <소스코드></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">#include <iostream></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">using namespace std;</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">int main(int argc, char** argv) {</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> //예제2-6 cin.getline()을 이용한 문자열 입력</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "주소를 입력하세요>>"; </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>char address[100]; </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cin.getline(address, 100, '\n'); </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "주소는 " << address << " 입니다.\n"; </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">}</p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><img class="__se_object" height="110" id="se_object_1612937178746" imgqe="true" jsonvalue="%7B%7D" rheight="110px" rwidth="450px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150911_99/sin10120_1441939914551pnPlP_PNG/%BD%C7%C7%E0%B0%E1%B0%FA.PNG" style="border-color: rgb(0, 0, 0); font-weight: bold; height: 110px; width: 450px;" width="450" /></p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><실행결과></b></p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><br style="clear: both; margin: 0px; padding: 0px;" /></b></p><div align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; text-align: center;"><b><b style="line-height: 1.5;"><img class="__se_object" height="210" id="se_object_1612937256099" imgqe="true" jsonvalue="%7B%7D" rheight="211px" rwidth="550px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150911_210/sin10120_1441939914826vDrqd_PNG/%C1%D6%BC%AE.PNG" style="border-color: rgb(0, 0, 0); height: 210px; width: 548px;" width="548" /></b></b></div><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"> </p><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><주석></b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b>5. 실습문제</b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> ‘.’문자가 입력될 때까지 도시의 이름을 문자열로 입력받아</b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> char city[21] 배열에 저장하는 cin.getline() 호출 코드를</b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> 작성하시오.</b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b></b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b> 도시의 이름은 최대 20글자이며, 영문자로 입력하는 것을 가정한다.</b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><br style="margin: 0px; padding: 0px;" /></b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><b><소스코드></b></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">#include <iostream></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">using namespace std;</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><br style="margin: 0px; padding: 0px;" /></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">int main(int argc, char** argv) {</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> cout << "도시를 입력하세요 : "; </p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> char city[21]; </p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> cin.getline(city, 21, '.'); </p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> cout << "도시이름은 " << city << "입니다.\n"; </p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">}</p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><img class="__se_object" height="151" id="se_object_1612937165203" imgqe="true" jsonvalue="%7B%7D" rheight="151px" rwidth="438px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150911_51/sin10120_1441940372078rqDed_PNG/%BD%C7%BD%C0_%B0%E1%B0%FA.PNG" style="height: 151px; width: 438px;" width="438" /></p><p align="left" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;"> </p><div align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; text-align: center;"><span style="line-height: 1.5;"><b><실행결과></b></span></div><div style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; text-align: center;"><br style="margin: 0px; padding: 0px;" /></div><div align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; text-align: center;"><img class="__se_object" height="185" id="se_object_1612937189436" imgqe="true" jsonvalue="%7B%7D" rheight="185px" rwidth="521px" s_subtype="photo" s_type="attachment" src="https://blogfiles.pstatic.net/20150911_132/sin10120_1441940372269gPv6w_PNG/%BD%C7%BD%C0_%C1%D6%BC%AE.PNG" style="border-color: rgb(0, 0, 0); height: 185px; line-height: 1.5; width: 521px;" width="521" /></div><p style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px; padding: 0px;"> </p><p align="center" style="font-family: 돋움, Dotum, Helvetica, sans-serif; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px; text-align: center;"><b><주석></b></p>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-2072974390404247392015-03-10T14:41:00.000+09:002021-02-10T18:37:13.109+09:00객체지향프로그래밍의 특징<table class="post-top" style="border-collapse: collapse; color: black; table-layout: fixed; width: 550px;"><tbody><tr><td class="p12" style="font-size: 12px;" valign="bottom"><p class="post_option" style="height: 18px; margin: 0px; padding: 0px; text-align: right;"></p></td></tr></tbody></table><div id="postViewArea"><div class="post-view pcol2 _param(1) _postViewArea220471400290" id="post-view220471400290" style="clear: both; color: #5f5e42; font-family: 돋움; font-size: 12px; line-height: 1.5; margin: 0px 0px 15px; overflow-wrap: break-word; overflow: auto hidden; padding: 15px 0px; position: relative; text-align: justify; width: 550px;"><div class="view" style="font-family: "1003773_10"; font-size: 10pt; line-height: 1.5;"><p style="line-height: 1.5; margin: 0px; padding: 0px;">1. 캡슐화</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 캡슐로 데이터를 감싸서 보호하는 것</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 클래스 : 객체를 만드는 틀을 의미함</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><span style="line-height: 1.5;"> 객체 : 그 틀로 만들어낸 실체</span></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;"><br /></p><p style="line-height: 1.5; margin: 0px; padding: 0px;">2. 상속</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 부모의 유전자를 그대로 물려받는 것 처럼 </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 부모 클래스에 선언 된 것들을 그대로 자식 클래스에서 상속받음. </p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 예) 오디오플레이어 -> 휴대용 MP3 -> 스마트폰</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> </p><p style="line-height: 1.5; margin: 0px; padding: 0px;">3. 다형성</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 뿌리는 같은 한 기능이지만 상황에 따라 다르게 보이거나 다르게 작동하는 현상</p><p style="line-height: 1.5; margin: 0px; padding: 0px;"> 예) 동물들의 울음소리 함수</p></div></div></div>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-74856752122182223352009-08-22T00:02:00.000+09:002011-01-29T22:26:00.628+09:00내가 진짜 아이팟 대항마! Creative Zii EGG Plazma<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><br /><div style="text-align: center;"><font style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-weight: bold;" size="5">난... 말로만 아이팟 대항마가 아니야!</font><br /></div><br /><br /><br /><p style="text-align: center;"><img style="width: 494px; height: 325px;" src="http://farm3.static.flickr.com/2435/3767465306_3cd1a10f75_o.jpg"> </p>
<p style="text-align: center;"><img style="width: 495px; height: 304px;" src="http://farm3.static.flickr.com/2435/3766661959_ba77969cee_o.jpg"> </p>
<div style="text-align: center;"><br /></div><p style="text-align: center;"><font size="3">아니 무슨 스펙으로 멀써 자신의 존재감을 뿜꼬 있는 지름신 좀 오는? 그런 모바일 기기 입니다. </font></p><p style="text-align: center;"><font size="3">생긴것도 아이팟 비슷하게 생긴게 그냥 대놓고 비교 하라고 만든 기기 같은 기분이네요..<br /></font></p><p style="text-align: center;"><font size="3">우선 스펙부터 보시지요 ~<br /></font></p><p><font size="3"><br /></font>
</p><table class="SpecificationTable" cellspacing="0" width="100%">
<tbody><tr>
<td width="50%"><font size="3">• 10-point <span style="color: rgb(227, 22, 0);">멀티제스쳐 touch</span> display</font></td>
<td width="50%"><font size="3">• Hardware <span style="color: rgb(227, 22, 0);">GPS receiver</span></font></td>
</tr>
<tr>
<td width="50%"><font size="3">• <span style="color: rgb(227, 22, 0);">3.5인치</span> 320x480 true-color display</font></td>
<td width="50%"><font size="3">• <span style="color: rgb(227, 22, 0);">Bluetooth</span> 2.1 + EDR</font></td>
</tr>
<tr>
<td width="50%"><font size="3">• X-Fi audio processing</font></td>
<td width="50%"><font size="3">• 3-axis 가속센서</font></td>
</tr>
<tr>
<td width="50%"><font size="3">• Up to <span style="color: rgb(227, 22, 0);">32GB Internal Flash</span> Storage</font></td>
<td width="50%"><font size="3">• Ambient light sensor</font></td>
</tr>
<tr>
<td width="50%"><font size="3">• 32MB NOR Flash (Linux Kernel Boot ROM)</font></td>
<td width="50%"><font size="3">• SDHC slot (<span style="color: rgb(227, 22, 0);">32GB SD카드까지 지원</span>)</font></td>
</tr>
<tr>
<td width="50%"><font size="3">• 256MB Mobile DDR RAM</font></td>
<td width="50%"><font size="3">•<span style="color: rgb(227, 22, 0);">미니 USB잭</span> (USB 2.0, 충전)<br /></font>
</td>
</tr>
<tr>
<td width="50%"><font size="3">• 720p and <span style="color: rgb(227, 22, 0);">1080p HDTV</span>s via HD cable</font></td>
<td width="50%"><font size="3">• Universal Docking connector (USB, Audio)</font></td>
</tr>
<tr>
<td width="50%"><font size="3">• <span style="color: rgb(227, 22, 0);">Composite video out</span></font></td>
<td width="50%"><font size="3">• 3.5파이 헤드폰잭, <span style="color: rgb(227, 22, 0);">내장스피커, 마이크</span> 채용</font></td>
</tr>
<tr>
<td width="50%"><font size="3">•<span style="color: rgb(227, 22, 0);"> Dual cameras</span></font></td>
<td width="50%"><font size="3">• Supports Plaszma OS and <span style="color: rgb(227, 22, 0);">Android</span></font></td>
</tr>
<tr>
<td width="50%"><font size="3"> - Forward facing VGA camera</font></td>
<td width="50%"><font size="3">• <span style="color: rgb(255, 0, 0);">1200mAH</span> rechargeable lithium-ion</font></td>
</tr>
<tr>
<td width="50%"><font size="3"> - Rear facing HD camera</font></td>
<td width="50%"><font size="3">• Light weight: 108grams</font></td>
</tr>
<tr>
<td width="50%"><font size="3">• <span style="color: rgb(227, 22, 0);">Wi-Fi 802.11 b/g</span></font></td>
<td width="50%"><font size="3">• 115 x 62 x 12 mm<br /></font></td>
</tr>
</tbody></table>
<p style="text-align: right; color: rgb(128, 128, 128);">스펙 출처 -<a target="_blank" href="http://brucemoon.net/"> <span style="color: rgb(255, 102, 0);">Bruce님 블로그</span></a> <br style="color: rgb(255, 102, 0);"></p><p style="color: rgb(128, 128, 128);"><br /></p><p style="text-align: center;"><br /> </p>
<div style="text-align: center;"><br /></div><p style="color: rgb(128, 128, 128); text-align: center;"><font size="3"><span style="color: rgb(0, 0, 0);">현재 아이팟 터치 2세대에 비해 압도적인 스펙을 가지고 있습니다. 그러니까 아이팟 사용하면서 마치 뭔가 빠진듯한 기분을 들게 했던 기능들을 다 겸하고 있습니다. 그리고 zii.com 에 가보면 아예 이 기기를 Stem Cell Computer 라 광고할 만큼 스펙을 자랑할 정도로 3D 게임, HD 동영상 재생 같은 것에 강하다는 것을 말할려고 하는 듯 싶습니다. 또한 이런 스펙인데도 불구하고 제품을 대량구매시 199$ 까지 내려가는 가격이며 개발자용 킷을 포함한 가격이 399$ 입니다. 한마디로 <span style="font-weight: bold;">아이팟보다 쌉니다.</span></span> 똑같은 용량의 아이팟 32기가 가격은.. 음.... ㅎㅎ? <span style="color: rgb(0, 0, 0);">그리고 이 이야기가 구라가 아닌 실제 creative 에서 발표한 내용으로. 믿어도 된다는 사실이지요.</span></font></p><p style="color: rgb(128, 128, 128);"><span style="color: rgb(0, 0, 0);"><br /></span></p><p style="text-align: center;"><img style="width: 451px; height: 327px;" src="http://farm3.static.flickr.com/2622/3766661057_742735cb0d_o.jpg"> </p>
<p style="color: rgb(0, 0, 0); text-align: center;"><font size="3"><br /></font></p><p style="color: rgb(0, 0, 0); text-align: center;"><font size="3">기능들을 하나씩 보자면.. 먼저 3.5인치의 멀티 터치 LCD! 여기서 살짝 흠이라면 현재 아이팟 대항마로 불리는 다른 기기들은 디스플레이로 OLED를 채택 하였는데 여기선 그런 디스플레이 관련 설명이 없는걸로 보아 아이팟과 같은 화면 성능을 보여줄 것으로 생각됩니다.</font></p><p style="color: rgb(0, 0, 0);"><br /></p><p style="color: rgb(0, 0, 0);"><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XdiJ6qlbKb.jpg" style="width:338px;height:312px;" alt="" onclick="TC$PRIV_open_img('http://ss.textcube.com/blog/1/15119/attach/XdiJ6qlbKb.jpg')" /></div></p><p style="color: rgb(0, 0, 0); text-align: center;"><font size="3"><br /></font></p><p style="color: rgb(0, 0, 0); text-align: center;"><font size="3"><span style="color: rgb(0, 0, 0);">그리고 구글의 안드로이드를 채택! 아 그러나 한가지 아쉬운 점이라면 안드로이드로만 가동 하는게 아니라 부분적으로 안드로이드를 사용한다는 것입니다. (플라즈마 OS를 같이 사용한다는 이야기) 그래도 다양한 어플리케이션은 맛볼 수 있다고 하네요.</span><br /></font> </p><p style="color: rgb(0, 0, 0); text-align: center;"><img src="file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/moz-screenshot-2.png" alt=""><div style="text-align: center; clear: both;"><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/CZ6It6z05rg&color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/CZ6It6z05rg&color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></div>
</p><div style="text-align: center; color: rgb(0, 0, 0);"><font size="3"><br /></font></div><div style="display: none; text-align: center;" id="Tab3_Content" class="TabContentArea TabContentAreaClosed">Create an extensive catalogue of premium 3D games with Airplay, an open standards SDK that works with all platforms.</div><div style="float: left; width: 400px; color: rgb(0, 0, 0); text-align: center;"><div style="overflow: auto;"><div id="TabsContainer">
</div>
<script language="JavaScript">
<!--
$(".TabContentArea").hide();
$(".TabTitle").click(function () {
if($(this).hasClass("TabTitleOpened")){
// close already opened tab
$("#"+this.id.replace("_Title","_Content")).slideUp("fast",closeTab(this.id));
}
else {
// open tab
var self=$("#"+this.id.replace("_Title","_Content"));
$(".TabContentArea").filter(function() {return this!=self}).slideUp("fast",function(){closeTab(this.id.replace("_Content","_Title"))});
self.slideDown("fast",openTab(this.id));
}
})
function openTabManually(id) {
$("#" + id.replace("_Title","_Content")).slideDown("fast", openTab(id));
}
function closeTab(id) {
$("#"+id).addClass("TabTitleClosed");
$("#"+id).removeClass("TabTitleOpened");
$("#"+id.replace("_Title","_Content")).addClass("TabContentAreaClosed");
$("#"+id.replace("_Title","_Content")).removeClass("TabContentAreaOpened");
}
function openTab(id) {
$("#"+id).addClass("TabTitleOpened");
$("#"+id).removeClass("TabTitleClosed");
$("#"+id.replace("_Title","_Content")).addClass("TabContentAreaOpened");
$("#"+id.replace("_Title","_Content")).removeClass("TabContentAreaClosed");
}
//-->
</script>
</div>
</div><div style="text-align: center; color: rgb(0, 0, 0);">
</div><p style="color: rgb(0, 0, 0); text-align: center;"><font size="3">다음으로 720P/1080P 의 HD 해상도를 재생할 수 있고 또 TV 아웃 할 수 있다는것.. 동영상을 보니 구라가 아니라 감상 가능할 정도로 잘 돌리는게 디빅스 플레이어들을 살짝 위협하는 정도입니다. 멋진데요 ^^;</font></p><p style="color: rgb(128, 128, 128);"><br /></p><p style="color: rgb(128, 128, 128);"><br /></p><p style="color: rgb(128, 128, 128);"><br /></p><p style="text-align: center;"><img src="file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/moz-screenshot.png" alt=""><img src="http://images.zii.com/images/Technology/Marketing/dualCameras.png" class="transparent" height="146px" width="283px"></p><p style="text-align: center;"><br /></p><p style="color: rgb(0, 0, 0); text-align: center;"><font size="3"><br /></font></p><p style="color: rgb(0, 0, 0); text-align: center;"><font size="3">그 다음으로 카메라 기능! 아이팟 터치에서 아쉬웠던 카메라 기능을 여기선 사용할 수 있네요. 게다가 아이폰보다 높은 HD 해상도로 찍는다는걸 보니 적어도 1280X720은 되나 보네요 이것도 요약해서 아이팟 보다 성능이 뛰어나다 입니다.</font><br /></p><div style="float: left; width: 285px; text-align: center; color: rgb(0, 0, 0);">
<br /> <br /><br /></div>
<p><br /></p><p style="text-align: center;"><img style="width: 455px; height: 67px;" src="http://images.zii.com/images/Technology/Marketing/sdhcSlot.jpg">
</p><div style="text-align: center;">
</div><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3">그리고 SD 카드를 꼽아서 최대 32+32GB 의 대형 용량을 만끽할 수 있다는 점. <br /></font></p><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3">아이팟 처럼 용량이 2배로 뛸때마다 가격도 한숨이 나오는.. 그런 나쁜 정책은 아니군요. 물론 이렇지 않으면 대항마라는 수식어가 붙을 이유가 없지요 ^^; 그런데 SDHC 카드는 다른 분들의 의견처럼 꼭 색을 맞춰서 사야겠네요. 아마 나중엔 저 카드 슬롯 부분을 적절히 가려주는 악세사리가 나올것 같네요.</font></p><p style="color: rgb(0, 0, 0);"><br /></p><p style="text-align: center;"><img src="http://images.zii.com/images/Technology/Marketing/gps.jpg"></p><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3"><br /></font></p><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3">또한 GPS 기능 탑제! 갑자기 애플에서 3GS에 GPS 기능을 넣었다고 했을때 반응이 엄청났던걸 생각하니 왠지 웃음이 나오네요.</font><br /> </p>
<br style="color: rgb(0, 0, 0);"><br /><br />
<div style="text-align: center;"><img src="http://images.zii.com/images/Technology/Marketing/hdVideoOutput.jpg"><br /></div><div style="text-align: center;"><span style="color: rgb(153, 153, 153);">제품의 하단부분. 왼쪽부터 3.5 파이 이어폰, TV 아웃 포트, 미니 USB 포트가 있다.</span><br /></div><div style="text-align: center;"><br />
</div><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3">그리고 어쩔 수 없이 아이팟에선 독을 사용했던 슬픈 기억이 있는 소비자들을 생각한건지는 모르겠지만. 미니 USB 포트를 채용했습니다. ^^ </font></p><p><br /></p><p style="text-align: center;"><img style="width: 356px; height: 295px;" alt="http://www.geekalerts.com/u/wifi-fan.jpg" src="http://www.geekalerts.com/u/wifi-fan.jpg"></p><p style="text-align: center;"><br /></p><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3">Wifi 채용은 요즘 아이팟 대항마라면 갖추어야 할 필수품이지요! </font><br /> </p>
<p><br /></p><p style="text-align: center;"><img src="http://farm3.static.flickr.com/2550/3766671733_441fd6827d_o.jpg"> </p>
<p style="text-align: center;"> </p>
<p style="text-align: center; color: rgb(0, 0, 0);"><font size="3">그리고 아이팟 터치에서는 1세대의 경우 내장 스피커가 없어</font></p><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3"> 따로 악세사리를 구매해야 되는 불편함과 </font>
</p><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3">2세대에서 조차 아직 내장형 마이크는 없는 실정을 <br /></font></p><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3">보안해 스피커와 마이크를 내장하였네요.</font></p>
<div style="text-align: center; color: rgb(0, 0, 0);">
</div><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3"><br /></font> </p><div style="text-align: center; color: rgb(0, 0, 0);">
</div><p style="text-align: center; color: rgb(0, 0, 0);"><font size="3">이런 멋진 기능을 갖추었고, 또 뽐뿌도 오는 제품이지만 아직 우리나라 현지화라는 장벽이 남아 있습니다. 특히 이 제품의 개발사인 크리에이티브 사는 지금까지 내놓은 제품중 몇개만을 국내에 내놓은 상태이며 A/S는 애플과 쌍벽을 이룬다는 점이 걸림돌 입니다. 이런 점에서 세계에선 애플을 때려 잡아도 과연 우리나라에서도 애플을 때려잡을지 의문이 드네요 ㅠ.ㅠ <br /></font></p><div style="text-align: center; color: rgb(191, 191, 191);"><font style="color: rgb(128, 128, 128);" size="3">그래도 사고는 싶다 !</font><br /></div><p style="color: rgb(191, 191, 191);"> </p>
<p><br /> </p><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com9tag:blogger.com,1999:blog-6332394202775912912.post-46304074061535297352009-08-17T22:20:00.000+09:002011-01-29T22:26:00.498+09:00Windows 7 정식 한글판 8월 21일 MSDN/TechNet을 통해 공개<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><font style="font-weight: bold; color: rgb(192, 0, 0);" size="5">힝~ 속았지? 정식 한글판 8월 21일에 나오지롱</font><span style="text-decoration: underline;"><span style="font-weight: bold;"><br /><br /><font size="3"><br /></font></span><font size="3"><br /></font></span><font size="3">놀랬습니다. 주워 들은 이야기론 9월 중순~ 10월 1일에 나온다고 한 정식판이 이렇게 빨리 나오다니.. 게다가 이 소식을 올린 분이 MS에서 제공 받은 정보로 신뢰할만 하다고 하니 더 기쁘네요.. ㅎㅎ<span style="text-decoration: underline;"><span style="font-weight: bold;"><br /><br /><br /></span></span>일단 이 소식을 영어 원문으로 볼까요? 는 뻥이고 제일 중요한 코리안이 나오는 곳만 볼까요?</font><span style="text-decoration: underline;"><span style="text-decoration: underline;"><br /><br /></span></span><div style="border: 1px solid rgb(204, 204, 204); padding: 10px; background-color: rgb(255, 255, 255);"><br />
<font color="#a50021"><font face="Tahoma"><font size="3"><b>Additional Information & Resources</b></font></font></font><br />
<b><font face="Tahoma">Release Waves</font></b><br />
<font face="Tahoma">893 different images are being released to MSDN Subscriber Downloads in 3 waves:</font><font face="Symbol">· </font><font face="Tahoma">Wave 1 (August 6th): </font>
<blockquote><font face="Courier New">o </font><font face="Tahoma">All Windows 7 Client (x86 and x64) Retail and VL Editions – English only</font><br /> <font face="Courier New">o </font><font face="Tahoma">Language packs, WAIKs, WDKs, SDKs, and Symbols – in all available languages</font><br /> </blockquote>
<font face="Symbol">· </font><font face="Tahoma">Wave 2 (August 14th):</font>
<blockquote><font face="Courier New">o </font><font face="Tahoma">Windows
Server 2008 R2 Standard, Enterprise, Datacenter, Web, Itanium (x64 and
ia64) – English, French, German, Italian, Spanish, Japanese</font><br /> <font face="Courier New">o </font><font face="Tahoma">All Windows 7 Client (x86 and x64) Retail and VL Editions – French, German, Italian, Spanish, Japanese </font><br /> <font face="Courier New">o </font><font face="Tahoma">Checked builds – English</font><br /> </blockquote>
<font face="Symbol">· </font><font face="Tahoma">Wave 3 (<span style="font-weight: bold;">August 21st</span>):</font><font face="Courier New">o </font><font face="Tahoma">Remaining
Windows 7 Client and Windows Server 2008 R2 Editions in the following
languages, released as they become available (likely order) – Dutch,
Russian, Simplified Chinese, Brazilian, Polish, <font style="color: rgb(255, 0, 0);" size="5">Korean</font>, Traditional
Chinese (Taiwan), Traditional Chinese (Hong Kong – SAR), Turkish,
Czech, Portuguese, Hungarian, Swedish, Danish, Norwegian, Finnish,
Arabic, Hebrew, Greek, Ukrainian, Thai, Romanian, Lithuanian, Slovak,
Bulgarian, Estonian, Croatian, Serbian Latin, Latvian, Slovenian</font><br />
<font face="Courier New">o </font><font face="Tahoma">Windows 7 Starter Edition – All languages<br /><br />지..진짜 있네? Korean!<br />
</font></div><br style="font-family: arial,helvetica,sans-serif;"><font style="font-family: arial,helvetica,sans-serif;" size="3"><br />아~~ 멋져부려~ <br /></font><font style="font-family: arial,helvetica,sans-serif;" face="Tahoma" size="3"><br />이제 한글 언어팩 통합판이 아닌 완전 정식판을 볼 수 있겠군요. 이제 카운트 다운을 하면서 기다리면 되겠습니다. ^^v<br /><br /><br /><br /></font><div style="text-align: right; font-family: arial,helvetica,sans-serif;"><font style="font-family: arial,helvetica,sans-serif;" size="3"><font size="2">* 접힌 부분을 통해 전문을 보실 수 있습니다.</font></font><br /></div><br style="font-family: Dotum,Sans-serif;"><p id="more-86-0" class="moreless_fold" style="color: #000000; padding: 0 0 0 10px;"><span style="cursor: pointer;" onclick="if (window.TC$PRIV_toggleMoreLessBlogger != undefined) {TC$PRIV_toggleMoreLessBlogger(this, '86-0','펼처두기..','접어두기..'); return false;} else {document.getElementById('content-86-0').style.display='';}">
펼처두기..</span></p>
<div id="content-86-0" class="moreless_content" style="display: none; border: 1px dashed #cccccc; background-color: #f3f3f3; margin: 0 10px padding: 5px;"><br /><br />
<font color="#a50021"><font face="Tahoma"><font size="3"><b>Summary</b></font></font></font><br />
<font face="Tahoma">On August 6th, the first public release of Windows 7 will be to <a onclick="pageTracker._trackPageview ('/outgoing/http_msdn_microsoft_com_en_us_subscriptions_default_aspx');" rel="nofollow" href="http://msdn.microsoft.com/en-us/subscriptions/default.aspx" target="_blank"><b><u>MSDN Subscribers</u></b></a>,
which is over two months ahead of the general availability date of
October 22nd for retail and OEM customers. To support the variety of
languages and builds,</font> <font face="Tahoma">893 different images are being released to MSDN Subscriber Downloads in three waves through August 21st.</font><br />
<font face="Tahoma">We
expect that this release will break all MSDN download traffic records,
which is why groups from across the company have gone through
tremendous effort to ensure its success. This has included but is not
limited to: load and performance testing on the MSDN Web site, adding
significant capacity to the product key servers, performance testing on
the product key servers, capacity planning for the download servers and
network, and more.</font><br />
<br />
<br />
<font color="#a50021"><font face="Tahoma"><font size="3"><b>Additional Information & Resources</b></font></font></font><br />
<b><font face="Tahoma">Release Waves</font></b><br />
<font face="Tahoma">893 different images are being released to MSDN Subscriber Downloads in 3 waves:</font>
<blockquote><font face="Symbol">· </font><font face="Tahoma">Wave 1 (August 6th): </font><blockquote><font face="Courier New">o </font><font face="Tahoma">All Windows 7 Client (x86 and x64) Retail and VL Editions – English only</font><br /> <font face="Courier New">o </font><font face="Tahoma">Language packs, WAIKs, WDKs, SDKs, and Symbols – in all available languages</font><br /> </blockquote><font face="Symbol">· </font><font face="Tahoma">Wave 2 (August 14th):</font><blockquote><font face="Courier New">o </font><font face="Tahoma">Windows
Server 2008 R2 Standard, Enterprise, Datacenter, Web, Itanium (x64 and
ia64) – English, French, German, Italian, Spanish, Japanese</font><br /> <font face="Courier New">o </font><font face="Tahoma">All Windows 7 Client (x86 and x64) Retail and VL Editions – French, German, Italian, Spanish, Japanese </font><br /> <font face="Courier New">o </font><font face="Tahoma">Checked builds – English</font><br /> </blockquote><font face="Symbol">· </font><font face="Tahoma">Wave 3 (August 21st):</font><blockquote><font face="Courier New">o </font><font face="Tahoma">Remaining
Windows 7 Client and Windows Server 2008 R2 Editions in the following
languages, released as they become available (likely order) – Dutch,
Russian, Simplified Chinese, Brazilian, Polish, <font style="font-weight: bold;" size="4">Korean</font>, Traditional
Chinese (Taiwan), Traditional Chinese (Hong Kong – SAR), Turkish,
Czech, Portuguese, Hungarian, Swedish, Danish, Norwegian, Finnish,
Arabic, Hebrew, Greek, Ukrainian, Thai, Romanian, Lithuanian, Slovak,
Bulgarian, Estonian, Croatian, Serbian Latin, Latvian, Slovenian</font><br /> <font face="Courier New">o </font><font face="Tahoma">Windows 7 Starter Edition – All languages</font><br /> </blockquote></blockquote>
<b><font face="Tahoma">E Versions</font></b>
<blockquote><font face="Symbol">· </font><font face="Tahoma">The E versions of Windows 7 do not include Internet Explorer. </font><br /> <font face="Symbol">· </font><font face="Tahoma">We
recommend that Subscribers get an Internet browser from Microsoft, or
another software manufacturer, so they can install it after they
install Windows 7. </font><br /> <font face="Symbol">· </font><font face="Tahoma">The E versions are limited to distribution in the EEA, Croatia, and Switzerland.</font><br /> </blockquote>
<b><font face="Tahoma">N Versions</font></b>
<blockquote><font face="Symbol">· </font><font face="Tahoma">The
N versions of Windows 7 do not include Internet Explorer or Windows
Media® Player and related technologies, such as Windows Media Center,
or Windows DVD Maker. </font><br /> <font face="Symbol">· </font><font face="Tahoma">Subscribers
will need software from Microsoft or a third party in order to browse
Internet web sites, play or create audio CDs, media files and video
DVDs, organize content in a media library, create playlists, convert
audio CDs to media files, view artist and title information of media
files, view album art of music files, transfer music to personal music
players, or record and playback TV broadcasts. </font><br /> <font face="Symbol">· </font><font face="Tahoma">We
recommend that Subscribers get an Internet browser from Microsoft, or
another software manufacturer, so they can install it after they
install Windows 7.</font><br /> <font face="Symbol">· </font><font face="Tahoma">The N versions are limited to distribution in the EEA, Croatia, and Switzerland.</font><br /> </blockquote>
<b><font face="Tahoma">Windows 7 Release Candidate Time Bomb Information</font></b>
<blockquote><font face="Symbol">· </font><font face="Tahoma">For
customers who continue to use the Windows 7 Release Candidate (RC)
release, license expiration messages will begin on Feb 14, 2010 and it
will time-bomb (shutdown every 2 hours) starting March 1, 2010.</font><br /> </blockquote>
<b><font face="Tahoma">Media Delivery for MSDN Subscribers</font></b>
<blockquote><font face="Symbol">· </font><font face="Tahoma">For Subscribers who receive media, the media for Windows 7 will be included in the November shipment.</font><br /> <font face="Symbol">· </font><font face="Tahoma">For media shipments in EMEA containing Win 7 SKUs, Microsoft will <b>not</b> be shipping the N versions of Windows 7. Instead, Microsoft will only ship the standard and E versions.</font><br /> </blockquote>
<b><font face="Tahoma">Supportability Notes</font></b><font face="Symbol">· </font><font face="Tahoma">To
reduce potential impacts on the Product Key system during the
anticipated high traffic immediately following launch, Microsoft has
pre-claimed a single product key on behalf of active subscribers who
claimed a Windows 7 Beta or RC key. The product key notes will state,
“If you retrieved a key for the Windows 7 Beta or RC, a Windows 7 key
has been provided for your convenience.”</font><br />
<font face="Symbol">· </font><b><font face="Tahoma">Upgrade Paths</font></b><font face="Tahoma">: There is NO supported upgrade path from either Windows 7 Beta or RC - to Windows 7 RTM. For more information, see </font><font color="windowtext"><font face="Tahoma"><a href="http://technet.microsoft.com/en-us/library/dd772579%28WS.10%29.aspx" target="_blank"><b><u>Windows 7 Upgrade Paths</u></b></a></font></font><font face="Tahoma">.</font><br />
<font face="Symbol">· </font><b><font face="Tahoma">Support for Windows 7 Home Basic and Home Premium</font></b><font face="Tahoma">:
There will NOT be Microsoft Product Support in place for Windows 7
Consumer Products (Home Basic and Home Premium) until General
Availability in October.</font><br />
<font face="Symbol">· </font><b><font face="Tahoma">E and N Versions</font></b><font face="Tahoma">:
The availability of these versions, without a Web browser (Internet
Explorer), is likely to cause some customer confusion in terms of the
steps they need to take to obtain one.</font><br />
<span style="text-decoration: underline;"><span style="font-weight: bold;"><br /><br /></span></span>출처:<a target="_blank" href="http://www.sevenforums.com/news/19018-windows-7-rtm-available-all-msdn-subscribers.html">Windows Seven Forums</a><br /></div><br /><span style="text-decoration: underline;"><span style="font-weight: bold;"><br /></span></span>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com3tag:blogger.com,1999:blog-6332394202775912912.post-13743388865330305152009-08-02T19:15:00.000+09:002011-01-29T22:26:00.197+09:00PC에서 내가 가진 패드를 XBOX360패드로 인식하게 하기 - Xinput<font size="3">요즘 게임들 보면 MS가 미친건지 360패드가 아니면 완벽 지원을 하지 않는 게임 또는 인식조차 안되는 게임(Xinput게임, Windows Live로 멀티플레이 하는 게임들)들이 많습니다. 그런걸 보면 짜증나지요.. 그래서 그런 불편함을 해결하기 위해 외국에서 만든 프로그램입니다.<br /><br /> 그리고 파일 출처는 토렌트다운으로, 어떤 멋진 분이 한글 설명까지 덧붙여 주셨더군요. <br /><br />압축 풀어주시고 원하는 게임 디렉토리에 압축풀린 파일을 다 넣어주시고, xbox360cemu.ini를 자기 패드에 맞게 설정해 줍니다. <br /><br />설정법을 간단하게 설명하자면<br /><br /><img alt="windows game contrller" src="http://www.motioninjoy.com/system/files/windows_game_contrller.PNG" align="none"><br />이 창에서 버튼 누르면 불켜지는 번호가 그 버튼 번호입니다. 그 번호를 입력해 주면 되는것이지요.<br />예를 들자면 <br /></font><div style="border: 1px solid rgb(178, 232, 237); padding: 10px; background-color: rgb(225, 253, 255);"><div style="border: 1px solid rgb(204, 204, 204); padding: 10px; background-color: rgb(255, 255, 255);"><font size="3">
Back=9 #BACK버튼에 할당할 패드버튼<br />
Start=10 #START버튼에 할당할 패드버튼<br />
</font></div></div><br /><br /><font size="3">
위의 내용을 설명하자면 패드버튼중에 9번버튼이 BACK버튼에, 10번 버튼이 스타트 버튼에 할당된다는 이야기입니다. 만약 내 패드의 스타트 버튼이 13번이라면 아래와 같이 10을 13으로 바꾸어 줍니다.<br /><br /></font><div style="border: 1px solid rgb(178, 232, 237); padding: 10px; background-color: rgb(225, 253, 255);"><div style="border: 1px solid rgb(246, 209, 246); padding: 10px; background-color: rgb(255, 235, 255);"><font size="3">
Start=13 #START버튼에 할당할 패드버튼</font></div>
</div><br /><font size="3"><br /><br /></font><font size="3">이런 방식으로 수정합니다. <br /></font><br /><font size="3">또 xinputest.exe 프로그램으로 테스트도 가능합니다.</font><br /><font size="3"><br />끝으로 </font><font size="3">패드로 즐겜하세요~</font><br /><font size="3"><br /></font><br /><div class="imageblock center" style="text-align: center; clear: both;"><a href="http://ss.textcube.com/blog/1/15119/attach/XZc5FdzzAQ.rar/Xinput.rar" rel="enclosure" ><img src="http://ss.textcube.com/service/blog/image/extension/unknown.gif" alt="" style="vertical-align: middle;" /> Xinput.rar</a></div>Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com2tag:blogger.com,1999:blog-6332394202775912912.post-22099141050809627312009-08-02T18:55:00.000+09:002011-01-29T22:25:59.979+09:00듀얼쇼크3/Sixaxis PC에서 사용하기 - Windows 7 64bit 지원<font size="3">컴퓨터 시스템이 이제 요즘 게임을 할 성능이 되니까 콘솔에서 하는것처럼 해보구 싶더군요. 그래서 구글링으로 얻은 좋은 프로그램을 소개해 드립니다. 중요한 점은 64비트 지원에, 유/무선이 가능하다는 것입니다. 물론 블루투스 동글이가 있어야 무선으로 가능하겠지요. 아래에서 알려드릴 드라이버는 <a target="_blank" href="http://www.motioninjoy.com/">Motion in joy</a>에서 배포한 것으로, 설치 방법은 홈페이지의 글을 의역해서 알려드릴 것입니다. 제 번역이 의심가시는 분들 또는 더 자세한 정보가 알고 싶으시면 제작자 홈페이지로 가는것이 좋을 것입니다.<br /><br /><font style="font-weight: bold;" size="5">드라이버 설치하기</font><br /><br /><br /><br /></font><div style="text-align: center;"><font size="3">64비트용<br /></font></div><div style="text-align: center;"><font size="3"><div class="imageblock center" style="text-align: center; clear: both;"><a href="http://ss.textcube.com/blog/1/15119/attach/XFQlhSmZPu.rar/MotioninJoy_0100_amd64.rar" rel="enclosure" ><img src="http://ss.textcube.com/service/blog/image/extension/unknown.gif" alt="" style="vertical-align: middle;" /> MotioninJoy_0100_amd64.rar</a></div><br />32비트용</font></div><font size="3"><div class="imageblock center" style="text-align: center; clear: both;"><a href="http://ss.textcube.com/blog/1/15119/attach/XUtS8wwaTL.rar/MotioninJoy_0100_x86.rar" rel="enclosure" ><img src="http://ss.textcube.com/service/blog/image/extension/unknown.gif" alt="" style="vertical-align: middle;" /> MotioninJoy_0100_x86.rar</a></div><br />자신의 운영체제에 맞게 압축파일을 받아 안에 있는 설치파일을 설치합니다. Next만 누르면 되서 스샷은 생략<br /><br /><br /></font><font style="font-weight: bold;" size="5">세부 설정</font> - WIN7 기준으로 설명되어 있네요<br /><br /><br /><font size="3"><br /></font><ol style="padding-left: 25px;"><li>
<p><font size="3"> USB로 패드와 컴퓨터를 연결합니다. XP사용자는 제어판-게임 컨트롤러에서 패드가 인식되는지 확인하시고, VISTA/7 사용자는 시작-프린터및 장치 관리자(맞는지 모르겠습니다)에서 패드가 인식되는지 확인합니다. 나중에 드라이버 설치후에 패드가 잘 입력이 되는지 설정할 수 있음. <br /></font></p>
<p> <font size="3"><img src="http://www.motioninjoy.com/images/software/windows_64_usb_input_device.png"></font>
</p></li><li>
<p><font size="3"><span style="font-weight: bold;">(3번부터 먼저 하시고 2번을 하시는 것을 권장합니다. 그 이유는 아래에)</span>시작-모든 프로그램-MOtioninjoy- install usb driver를 관리자 권한으로 실행합니다. 만약 관리자 권한으로 실행하지 않을경우 제대로 설치가 안됩니다 From the Start button,run the "Start->All Programs->MotioninJoy->Install USB driver".<strong>Make sure to right click and "Run as administrator"</strong>or The driver will not install properly if your system is x64,before you do next step. <br /></font></p>
<p> <font size="3"><img src="http://www.motioninjoy.com/images/software/windows_64_run_as_admin.png"></font>
</p></li><li>
<p><font size="3">32비트 사용자는 이 스텝을 스킵하세요. '드라이버 서명 해제'(서명이 없는 드라이버를 사용하게 하는 기능, VISTA이후의 MS 운영체제에는 모두 서명이 없으면 사용 못하게 해놓았습니다.)를 POST 후에 F8키를 눌려서 나온 메뉴에서 선택합니다. 제가 해보니 이 스텝이 USB 드라이버 설치 전에 해야 되는 것 같습니다. <span style="font-weight: bold;">(즉, 3번과 2번의 순서가 뒤바뀐 것 같음. 유선 연결 가이드만 따로 소개한 페이지엔 이 3번이 2번보다 먼저 실행 하라고 되어 있음.) </span> If<br />
your system is 32bits windows skip this step. Restart Windows-when it<br />
starts to boot up again repeatedly press F8 key just after the BIOS<br />
does its POST.Select "<strong><span style="color: rgb(153, 0, 102);">Disable Driver Signature Enforcement</span></strong>".</font></p>
<p> <font size="3"><img src="http://www.motioninjoy.com/images/software/windows_7_advanced_boot_options.png"></font>
</p></li><li>
<p><font size="3"><span style="font-weight: bold;">무선 사용자만 필요합니다. 유선 사용자는 무시합니다. </span>다른 USB 동글(패드 연결하는데 쓰이는 동글 제외한 것)은 다 뽑으시고 시작-모든프로그램-Motioninjoy-Install Bluetooht Driver 을 관리자 권한으로 실행. 설치합니다. 만약 다른 동글도 사용하실 것이면 이 패드 설정 이후에 꼽으라네요
Unplug the other USB bluetooth dongls if any except the one you need to<br />
connect sixaxis or ds3.After windows install its default driver, <strong><em>right click</em></strong>(Start->All Programs->MotioninJoy->Install Bluetooht driver)<strong><em>run as administrator</em></strong>. If need to use other bluetooth dongles, just plug it in after installation finished.<br /></font>
</p>
</li><li>
<p><font size="3">64비트 사용자일 경우 6번 스텝을 다시 하라? 도와주세요 ..ㅠㅠ 감으로 때리자면 아무래도 USB 드라이버 설치할때 처럼 드라이버 서명 무시로 부팅하라는 뜻인것 같습니다.(블루투스 드라이버 설치 전에) If your system is 64bits windows do step 6 again.<br /></font>
</p>
</li><li>
<p><font size="3">시작-모든 프로그램-MotioninJoy->DS3 TOOL( <strong>Microsoft dotNET 3.5를 필요로 합니다</strong>)실행후 페어링 버튼을 눌려 줍니다(무선 사용자만 하세요) Start->All Programs->MotioninJoy->DS3 TOOL(request <strong>Microsoft dotNET 3.5</strong>),click "Pairing" button.</font></p>
<p> <font size="3"><img src="http://www.motioninjoy.com/images/software/motioninjoy_options.png" height="151" width="789"></font>
</p></li><li>
<p><font size="3"> 역시 무선 사용자만 합니다. USB로 연결된 패드를 뽑아버리고 PS버튼을 누르면 1P에 불이 들어오면서 진동이 온다고 하네요. Unplug the USB wire,press Playstation 3<br />
controller's "PS" button shortly to connect via bluetooth,The LED of<br />
"1" will always light after connected,dualshcok 3 will vibrates a<br />
moment.<br /></font>
</p>
</li><li>
<p><font size="3"> <img alt="windows game contrller" src="http://www.motioninjoy.com/system/files/windows_game_contrller.PNG" align="none"> 여기서 버튼 입력이 잘 되는지 알 수 있습니다. XP사용자는 제어판-게임 컨트롤러를 켜서 확인 가능. VISTA/7은 프린터및 장치 관리자 에서 패드 아이콘을 오른쪽 클릭하여 게임 컨트롤러 설정-속성을 클릭해서 수정이 가능합니다. 입력이 잘 되시면(아직 아날로그는 인식이 안될겁니다. 옵션 설정을 통해 인식하게 할 수 있음. 아래 9번의 옵션 설명을 참조하세요)<br /></font></p></li><li><ul><li><font size="3"><span style="font-weight: bold;">Digital Gamepad(Dpad,without joystick) </span>조이스틱 인식 안함, 위닝 같은 십자키로 하는것이 편한 게임에 사용.PS1 패드와 비슷함. Digital set up, Dpad works off of the X/Y axis. This is like the PS1 controller, works well for soccer games. <br /></font></li><li><font size="3"><span style="font-weight: bold;">Analog Gamepad1(POV,Joysticks)</span> PS2패드와 비슷하다고 합니다. 저는 Xinput 프로그램을 통해서 액박패드처럼 사용하므로 아날로그 2 설정을 사용합니다. Dpad
is set to POV/hat switch, the 2 analog sticks are set up on the X,Y, Z
and RZ axes. This is like a PS2 controller and is currently the most
used.</font></li><li><font size="3"><span style="font-weight: bold;">Analog Gamepad2(POV,Joysticks,Analog Triggers)</span> XBOX360과 동일한 기능을 하게 해주는 설정. 저는 이 설정을 택했습니다. Dpad
is set to POV/hat switch, the 2 analog sticks are set up on the X,Y, Z
and RZ axes, L2 and R2 are also on an axis. This works well for racing
games and is similar to the XBOX 360 controller.</font></li><li><font size="3"><span style="font-weight: bold;">Analog Gamepad3(POV,Joysticks,Analog Triggers,Motion sensor)</span> 모션 센서 기능(육축)을 사용 가능하게 해준다네요. 아날로그 게임패드2 설정에서 모션센서 기능만 추가한 것입니다. 이 옵션을 택해도 Xinput 사용에 지장 없습니다. This is similar to Gamepad2 with the added effect of motion sensors. At the moment it's not very practical.</font></li><li><font size="3"><span style="font-weight: bold;">Emulate Xinput</span> 게임내에서 xbox360패드처럼 인식하게 합니다. 이 기능은 유용한 기능입니다. 자세한 설명은 다음 포스팅 에서 설명합니다. 그러나 ds3tool에선 아쉽게도 아직 지원 안한다고 하네요. Imitates the XBOX 360 controller. Is currently greyed out because it's still unusable.</font></li><li><font size="3"><span style="font-weight: bold;">Enable vibration</span> 진동 설정. 당연히 체크해야 겠지요. 그러나 전 체크해도 진동이 안오네요 --ㅋ(유선 사용중) Enables vibration. [duh]</font></li><li><font size="3"><span style="font-weight: bold;">Enable Option</span> 옵션 적용 버튼입니다. 옵션 다 설정하셨으면 꾸욱 눌려주세요. Applies the above settings.</font></li></ul><font size="3"><img alt="motioninjoy options" src="http://www.motioninjoy.com/system/files/motioninjoy_options_1.png" align="none"></font><p><font size="3"> <br /></font>
</p>
</li><li>
<p><font size="3">Enjoy your <strong>windows game</strong>. 즐겜하세요~ <br /></font>
</p>
</li><li>
<p><font size="3">PS버튼을 길게 누르면 패드와의 연결을 끊는다고 하네요. 아무래도 블루투스 사용자들을 위한 설명인듯. Long press Playstation 3 controller's(sixaxis' or dualshcok 3's) "PS" button to disconnect.</font></p></li><li><font size="3">여기 제작자가 제작한 설명이 아닌듯 하네요 링크 타면 원본 강좌를 볼 수 있을듯 싶네요 thanks hardcoreware.net,they provided a very good guide <a href="http://www.hardcoreware.net/how-to-playstation-3-controller-64-bit-windows-7-vista/" title="http://www.hardcoreware.net/how-to-playstation-3-controller-64-bit-windows-7-vista/">http://www.hardcoreware.net/how-to-playstation-3-controller-64-bit-windo...</a></font></li></ol><font size="3"><br />힘든 여정이 끝났습니다. 그리고 Xinput에 관한 설명은 추후 하겠습니다. 정말 유용하거든요.</font><br /><font size="3"><br />한가지 아쉬운점이라면 제가 지금 유선으로 사용중인데 중요한 진동이 안되네요 ㅠㅠ 되시는 분들 덧글 부탁드립니다.</font><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com7tag:blogger.com,1999:blog-6332394202775912912.post-7032937837549561372009-07-16T13:13:00.000+09:002011-01-29T22:25:59.802+09:00하루에 하나씩 유료 소프트웨어를 무료로 받자! - Giveaway of the Day<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><br /><font style="font-weight: bold;" size="5">난 공짜 아니면 안써!</font><br /><a target="_blank" href="http://www.giveawayoftheday.com"><br /><font style="font-weight: bold;" size="4">Giveaway of the Day</font></a><br /><br /><font size="3">인터넷에서 소프트웨어를 받다 보면 한번씩 시리얼이나, 회원 가입을 요구하는 프로그램들이 있습니다. 그리고 또 구입 할려고 하니 망설여지고.. 결국 조금 불편하지만 프리웨어로 가시는 분들이 많지요. 그런 분들을 위해 이 사이트를 소개합니다. 한국 사이트는 아니지만 뭐.. 그림만 봐도 무슨 프로그램인지 알 수 있기에 소개드리겠습니다.</font> <font size="3">그전에 사이트의 전경을 감상해볼까요?<br /></font><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XUP2MuF38E.jpg" style="width:640px;height:701px;" alt="" onclick="TC$PRIV_open_img('http://ss.textcube.com/blog/1/15119/attach/XUP2MuF38E.jpg')" /></div><font size="3"><br />멋진 모습입니다. 내가 가지고 싶었지만 유료라서 사용을 못했던 프로그램이 많군요. 여기서 얻는게 괜히 구글에 크랙 찾고 하는 생활보단 더 나은 것 같습니다. 여러분들도 하나 받아 보세요! 아 그런데 이것도 원어데이 쇼핑몰 처럼 그 하루가 지나가면 그 프로그램은 받을 수 없습니다. 버스가 지나가는거죠. 그러니 빨리 받으시는게 좋을 거에요 ㅋㅋ 일단 쓸일 없어도 받고 보자!</font><br /><br /><font size="3">그리고 유저 점수가 보이시죠? 저거 보고 소프트웨어의 질도 대충 짐작하실 수 있으실 거에요 ^^;</font><br /><br /><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com4tag:blogger.com,1999:blog-6332394202775912912.post-18313800619507199412009-07-15T15:32:00.000+09:002011-01-29T22:25:59.589+09:00Firefox 테마 - Safari 테마 설치하기<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XHC7ZU30NM.jpg" style="width:640px;height:523px;" alt="" onclick="TC$PRIV_open_img('http://ss.textcube.com/blog/1/15119/attach/XHC7ZU30NM.jpg')" /></div><br /><font style="font-weight: bold;" size="5"><a target="_blank" href="https://addons.mozilla.org/ko/firefox/addon/11164">Vfox</a><font size="3"><br /></font></font><font size="3"><br />이미지 하나로 모든걸 소개하겠습니다! 그냥 safari 기분 나게 해주는 테마입니다. 깔끔해서 쓰기 좋아요.<br /><br />이것 뿐만 아니라 모질라 부가기능 페이지에서 수많은 테마를 감상하실 수 있습니다!</font><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com10tag:blogger.com,1999:blog-6332394202775912912.post-39475101042020242502009-07-15T11:57:00.000+09:002011-01-29T22:25:59.549+09:00뽐뿌닷컴을 아시나요?<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XAJYTPiZim.jpg" style="width:642px;height:614px;" alt="" onclick="TC$PRIV_open_img('http://ss.textcube.com/blog/1/15119/attach/XAJYTPiZim.jpg')" /></div><font size="3"><font style="font-weight: bold;" size="5"><a target="_blank" href="http://www.ppomppu.co.kr/index.php">뽐뿌 닷컴</a>을 아시나요?</font><br /><br />뽐뿌 닷컴, 한마디로 말해 지름과 관련된 정보를 나누는 커뮤니티입니다.<br /><br />혹자들은 <span style="font-weight: bold;">'뽐뿌닷컴엔 거지들만 모였다'</span></font> <font size="3">라고 놀릴만큼(뽐뿌닷컴 까는 글 아닙니다.. ㅠㅠ)정말 알뜰살뜰한 정보가 많습니다. 그리고 자신의 지름을 자랑하기도 하고, 쇼핑몰 쿠폰 정보를 알리기도 합니다. 또 업체 게시판엔 홍보글이 많은데, 다른 사이트에 비해 사은품이 큰 편입니다. <span style="font-weight: bold;">루리웹, 다나와</span> 같이 거대한 사이트에서 하는것과도 사은품 크기가 다릅니다. 여기서 사기치는넘들 아냐? xx... 라고 하실지도 모르겠는데. 여기에선 사기당하는걸 많이 못봤습니다. 왜냐면 뒤가 무섭기도 하거든요. 여기서 매장당하면 장사 접어야 할겁니다. </font><br /><br /><font style="font-weight: bold;" size="5">그런데.. 당신은 어떤걸 샀나요?</font><font size="3"><br /></font><font size="3"><br />음... 제가 제일 많이 들어가고 또 사기도 하는 게시판은 휴대폰 뽐뿌 게시판과 업체 게시판(주로 인터넷 가입이 많음) 입니다. 위에서 말한것 처럼 일단 사은품이 많구요, 핸드폰의 경우 인터넷에 올라온 구입글중에 보통 말하는 '버스폰(가격이 싼폰, 다른 용어로는 택시폰, 비행기 등이 있다. 요금 생각하면 뜻이 상상이 가시죠?)'만 모은 곳이다. 구입도 해봤고 사기는 별로 없는 것 같습니다. 그리고 스샷에 처럼 다른 정보도 많아요 ^^; <br /><br /><span style="font-weight: bold;">끝으로 이 글을 보는 당신, 오늘 이 사이트 들어가셔서 하나 지르시는건 어떨까요? </span></font><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-85684768666693800372009-07-15T11:42:00.000+09:002011-01-29T22:25:59.506+09:00PS3 독점게임 발매 일정 - 언차티드2 9월 30일 발매?<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XdOHQFBNw1.bmp" style="width:588px;height:377px;" alt="" /></div><font size="3"><br />외국 PS3 팬 사이트에서 올라온 자료입니다.<br /><br />이대로라면 언차티드는 9월 말에 만날 수 있겠군요. 아 그리고 갓오브워 3 는 <span style="font-weight: bold;">10년 3월 발매</span>라고 E3에서 말했었습니다. 게임 요즘에 잘 안했는데 이제 타이틀 살때가 된건가요 ㅋㅋ?</font><br /><br /><p id="more-74-0" class="moreless_fold" style="color: #000000; padding: 0 0 0 10px;"><span style="cursor: pointer;" onclick="if (window.TC$PRIV_toggleMoreLessBlogger != undefined) {TC$PRIV_toggleMoreLessBlogger(this, '74-0','399$ 짜리 그릴','...?'); return false;} else {document.getElementById('content-74-0').style.display='';}">
399$ 짜리 그릴</span></p>
<div id="content-74-0" class="moreless_content" style="display: none; border: 1px dashed #cccccc; background-color: #f3f3f3; margin: 0 10px padding: 5px;"><br /><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XPBn75kzsR.jpg" style="width:500px;height:375px;" alt="" /></div><br /></div><br /><br /><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-38655112915045468542009-07-12T14:54:00.000+09:002011-01-29T22:25:59.289+09:00블로그 생애 첫 1만힛 돌파!<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XKZNl1GtK3.bmp" style="width:260px;height:148px;" alt="" /></div><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XQ5AcxFvpN.jpg" style="width:640px;height:508px;" alt="" onclick="TC$PRIV_open_img('http://ss.textcube.com/blog/1/15119/attach/XQ5AcxFvpN.jpg')" /></div><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XP6Ga9GxG4.jpg" style="width:640px;height:429px;" alt="" onclick="TC$PRIV_open_img('http://ss.textcube.com/blog/1/15119/attach/XP6Ga9GxG4.jpg')" /></div><br /><br />아니, 남들은 100만힛 50만힛 되도 기념 안하던데 왜 하냐고 할 분도 계시겠지만 제가 처음으로 1만힛 넘어보거든요; 자축이라도 해야겠습니다 호호 <br /><br />예전에 네이버나 다음 블로그엔 정말 자료창고 식으로 포스팅 해서 아무도 안봣거든요.. 메타블로그 가입하니 히트수도 몰라가고 신기한 기능입니다; 그리고 제 역사상 최단(1달하고 5일), 최고의 히트수네요. 기분 좋아요 ^^<br /><br /><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com12tag:blogger.com,1999:blog-6332394202775912912.post-15818871436134308942009-07-11T23:01:00.000+09:002011-01-29T22:25:59.134+09:00DDoS는 방어한 당신! 혹시 Conficker 웜 바이러스를 아시나요?<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><font style="font-weight: bold; color: rgb(255, 102, 0);" size="5">Conficker, 도대체 무슨 바이러스에요?</font><br /><br />이 변종 웜 바이러스는 4월1일 이후에 발생한 (특정일에 발생되는 바이러스) 웜 바이러스로, USB 이동 저장 매체등을 통해 감염되기도 하는 위험한 바이러스입니다. 침투시 보안과 관련된 업체 도메인을 차단하고, p2p에서 악성코드를 받게 하여 컴퓨터를 병에 걸리게 하는 바이러스입니다. 자세한 내용은 아래 접힌 부분에서..<br /><br /><br /><br /><font style="font-weight: bold;" size="5"><span style="color: rgb(255, 102, 0);">그럼 어떻게 치료하죠?</span></font><br /><br />첨부한 전용 바이러스 백신으로 검사및 치료를 합시다. slience 파일은 백그라운드에서 검사/치료해주는 백신입니다. 지금 하고계신 업무에 방해가 가는게 싫으실 경우 사용하세요. 다른 파일들은 파일명만 보셔도 아실듯 ^^; 그리고 <a target="_blank" href="http://www.boho.or.kr/pccheck/pcch_03.jsp?page_id=3">보호나라</a>에 접속하셔서 인터넷으로 간소하게 감염 여부를 DDoS 감염 여부화 함께 확인 하실 수 도 있습니다.<br /><br /><div class="imageblock center" style="text-align: center; clear: both;"><a href="http://ss.textcube.com/blog/1/15119/attach/XDbaal2gpF.exe/v3conficker.exe" rel="enclosure" ><img src="http://ss.textcube.com/service/blog/image/extension/exe.gif" alt="" style="vertical-align: middle;" /> v3conficker.exe</a></div><div class="imageblock center" style="text-align: center; clear: both;"><a href="http://ss.textcube.com/blog/1/15119/attach/XNkxL6E0fi.exe/v3conficker_silence.exe" rel="enclosure" ><img src="http://ss.textcube.com/service/blog/image/extension/exe.gif" alt="" style="vertical-align: middle;" /> v3conficker_silence.exe</a></div><div class="imageblock center" style="text-align: center; clear: both;"><a href="http://ss.textcube.com/blog/1/15119/attach/XVBgwaDzBb.exe/v3conficker_silence_sc.exe" rel="enclosure" ><img src="http://ss.textcube.com/service/blog/image/extension/exe.gif" alt="" style="vertical-align: middle;" /> v3conficker_silence_sc.exe</a></div><div class="imageblock center" style="text-align: center; clear: both;"><a href="http://ss.textcube.com/blog/1/15119/attach/XTdJJOCYvD.exe/v3conficker_x64.exe" rel="enclosure" ><img src="http://ss.textcube.com/service/blog/image/extension/exe.gif" alt="" style="vertical-align: middle;" /> v3conficker_x64.exe</a></div><br /><br /><p id="more-72-0" class="moreless_fold" style="color: #000000; padding: 0 0 0 10px;"><span style="cursor: pointer;" onclick="if (window.TC$PRIV_toggleMoreLessBlogger != undefined) {TC$PRIV_toggleMoreLessBlogger(this, '72-0','자세한 내용 보기..','접어두기..'); return false;} else {document.getElementById('content-72-0').style.display='';}">
자세한 내용 보기..</span></p>
<div id="content-72-0" class="moreless_content" style="display: none; border: 1px dashed #cccccc; background-color: #f3f3f3; margin: 0 10px padding: 5px;"><br /><div id="view_content">
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">MS08-067 </span><span style="font-family: 돋움;">취약점<span lang="EN-US">[1] </span>및<span lang="EN-US"> USB </span>이동저장매체 등으로 전파<span lang="EN-US">[2]</span>되는 악성코드<span lang="EN-US"> Conficker[3]</span>의 새로운 변종이 추가적으로 발견되었으며<span lang="EN-US">, </span>이 가운데 일부는<span lang="EN-US"> HTTP </span>및<span lang="EN-US"> P2P </span>통신을 통한 추가 악성코드 전파를 시도하므로<span lang="EN-US"> PC</span>사용자들의 피해 주의가 필요합니다<span lang="EN-US">. <보호나라><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">[</span><span style="font-family: 돋움;">악성코드 피해 증상<span lang="EN-US"> [4,5]]<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">o </span><span style="font-family: 돋움;">임의의<span lang="EN-US"> IP</span>로<span lang="EN-US"> TCP/UDP </span>스캔 패킷을 발생시킴<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">o </span><span style="font-family: 돋움;">매일 임의의 문자열로 생성된<span lang="EN-US"> 500</span>개의 도메인에 대한 접속 및 추가 악성코드 다운로드 시도<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">o P2P </span><span style="font-family: 돋움;">네트워크 형성 및 추가 악성코드 다운로드<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">o microsoft, windowsupdate, hauri, ahnlab </span><span style="font-family: 돋움;">등 보안 관련 특정 문자열이 포함된 도메인들에 대한<span lang="EN-US"> DNS </span>요청을 차단<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">o procexp, tcpview, wireshark </span><span style="font-family: 돋움;">등 각종 모니터링 도구를 종료시킴<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">o </span><span style="font-family: 돋움;">다음 윈도우 보안 서비스를 중지<span lang="EN-US">/</span>비활성화 시킴<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- Windows Security Center Service (wscsvc)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- Windows Defender Service (WinDefend)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- Windows Automatic Update Service (wuauserv)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- Background Intelligent Transfer Service (BITS)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- Windows Error Reporting Service (ERSvc / WerSvc)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">[</span><span style="font-family: 돋움;">예방 방법<span lang="EN-US">]<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">Conficker </span><span style="font-family: 돋움;">변종은<span lang="EN-US"> MS08-067 </span>취약점<span lang="EN-US">, </span>공유폴더<span lang="EN-US">, USB </span>이동저장매체 등 다양한 형태의 감염경로를 나타냄으로 다음과 같은 조치가 필요합니다<span lang="EN-US">.<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">o </span><span style="font-family: 돋움;">일반 인터넷 이용자 <span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- MS08-067 </span><span style="font-family: 돋움;">보안업데이트<span lang="EN-US">[1] </span>설치<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span></span><span style="font-family: 돋움;">※ 현재까지 나온 모든 보안업데이트 적용 권고<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span></span><span style="font-family: 돋움;">※ 윈도우 자동 업데이트 설정<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span></span><span style="font-family: 돋움;">시작 → 제어판 → 자동 업데이트 → 자동<span lang="EN-US">(</span>권장<span lang="EN-US">) </span>체크 → 적용 → 확인<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- </span><span style="font-family: 돋움;">개인방화벽 및 백신 사용의 생활화<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- </span><span style="font-family: 돋움;">불필요한 파일 공유는 제거하고<span lang="EN-US">, </span>필요하다면 적절한 권한 제어와 유추하기 힘든 비밀번호 설정<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- </span><span style="font-family: 돋움;">이동식 드라이브의 자동으로 실행 방지<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span></span><span style="font-family: 돋움;">※ <font color="#013add"><a href="http://www.krcert.or.kr/secureNoticeView.do?num=308&seq=-1" target="_blank"><font color="#013add">파일<span lang="EN-US">(usbguard.zip)</span> 다운로드</font></a></font> 및 압축해제 후<span lang="EN-US"> usbguard.exe </span>실행<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span></span><span style="font-family: 돋움;">※ 프로그램 출처<span lang="EN-US"> : </span>국가사이버안전센터<span lang="EN-US">(NCSC)<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- </span><span style="font-family: 돋움;">만우절 등과 같은 특정일을 악용하여 활동 및 전파하는 악성코드가 많으므로<span lang="EN-US">, PC </span>및 인터넷 사용에 있어 각별한 주의가<br /> 요구됨<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">o </span><span style="font-family: 돋움;">네트워크 관리자<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- </span><span style="font-family: 돋움;">운영중인 보안장비에서 탐지가 가능하도록 최신 룰 업데이트<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><span style=""> </span>- </span><span style="font-family: 돋움;">외부로부터<span lang="EN-US"> TCP 139, 445 </span>트래픽이 유입이 되지 않도록 차단하고<span lang="EN-US">, </span>기관<span lang="EN-US">/</span>기업 내부 네트워크에서도 자체 검토 후<br /> 불필요한 경우 차단<span lang="EN-US"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">[</span><span style="font-family: 돋움;">참조사이트<span lang="EN-US">]<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">[1] <a href="http://www.microsoft.com/korea/technet/security/bulletin/MS08-067.mspx" target="_blank">http://www.microsoft.com/korea/technet/security/bulletin/MS08-067.mspx</a></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">[2] <a href="http://www.krcert.or.kr/secureNoticeView.do?num=308&seq=-1" target="_blank">http://www.krcert.or.kr/secureNoticeView.do?num=308&seq=-1</a></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">[3] <a href="http://www.krcert.or.kr/secureNoticeView.do?num=306&seq=-1" target="_blank">http://www.krcert.or.kr/secureNoticeView.do?num=306&seq=-1</a></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 250%;"><span style="font-family: 돋움;" lang="EN-US">[4] <a href="http://mtc.sri.com/Conficker/addendumC/" target="_blank"><span style="font-family: 돋움;" lang="EN-US">http://mtc.sri.com/Conficker/addendumC/<o:p></o:p></span></a><br /></span><span style="font-family: 돋움;" lang="EN-US">[5] <a href="http://www.microsoft.com/security/portal/Entry.aspx?Name=Worm%3aWin32%2fConficker.C" target="_blank">http://www.microsoft.com/security/portal/Entry.aspx?Name=Worm%3aWin32%2fConficker.C</a></span></p><br /></div></div><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com7tag:blogger.com,1999:blog-6332394202775912912.post-50576165788107109872009-07-10T23:36:00.000+09:002011-01-29T22:25:58.943+09:00검색 포털 1위 네이버, 애플 앱스토어에 침투!<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><div class="imageblock dual center" style="text-align: center; clear: both;"><table cellspacing="5" cellpadding="0" border="0" style="margin:0 auto;"><tr><td><img src="http://ss.textcube.com/blog/1/15119/attach/XCJ5SviObm.gif" style="width:91px;height:93px;" alt="" /></td><td><img src="http://ss.textcube.com/blog/1/15119/attach/XL8SS2yka7.gif" style="width:91px;height:93px;" alt="" /></td><td><img src="http://ss.textcube.com/blog/1/15119/attach/XKUQw0hYb8.gif" style="width:91px;height:93px;" alt="" /></td></tr></table></div><br /><div class="imageblock dual center" style="text-align: center; clear: both;"><table cellspacing="5" cellpadding="0" border="0" style="margin:0 auto;"><tr><td><img src="http://ss.textcube.com/blog/1/15119/attach/XIEaVk1IO6.gif" style="width:91px;height:93px;" alt="" /></td><td><img src="http://ss.textcube.com/blog/1/15119/attach/XSYFr9mMlb.gif" style="width:91px;height:93px;" alt="" /></td><td><img src="http://ss.textcube.com/blog/1/15119/attach/XDadaDB2pM.gif" style="width:91px;height:93px;" alt="" /></td></tr></table></div><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XTfQvBXv78.gif" style="width:91px;height:93px;" alt="" /></div><br /><br /><ul><li><font size="6"><span style="color: rgb(255, 102, 0); font-weight: bold;">네이버, 모바일 시장을 넘보다?</span></font></li></ul><font size="3"><br />현재 포털 1위를 달리는 <a target="_blank" href="http://mobile.naver.com/home/index.nhn">네이버</a>, 이제 모바일 시장에서도 그 힘을 발휘할려나 봅니다.(이전까지는 다음만 애플 스토어에 어플을 등록했었음) 네이버가 꿈꾸는 네이버 월드에 더 가까워 지기 위해서죠. <br /><br />아무튼 모바일 어플리케이션은 총 7종, 그중 유료 어플은 사전(0.99$로 다른 사전 어플에 비해 쌈)밖에 없습니다. 네이버라는 대형 포털이기에 가능한 무료 어플들이 많습니다. 모두 유용한 어플리케이션이며, 특히 네이버 웹툰은 기존에 있던 유료 만화 어플을 대체하고도 남는 위력을 가졌습니다. <br /><br />그러나 네이버 지도 어플리케이션 만큼은 다음의 지도 어플과 비교가 됩니다. 실시간 교통정보가 있지만.. 다음이 ui도 편하고, 특히 로드뷰가 일품이라 지도는 설치만 하고 잘 사용하지 않네요.<br /></font><br /><br /><ul style="font-weight: bold;"><li><font style="color: rgb(255, 102, 0);" size="6">경쟁 회사(다음)과의 차이점?</font></li></ul><br /><font size="3">차이점을 말하라고 하면.. 딱히 말할 것이 없습니다. 왜냐면 이 둘은 예전부터 경쟁회사여서 서로서로 닮아가는 판국이 되어 먼저 모바일에 뛰어든 다음과 큰 차이점은 없으나, 다음이 사용하기엔 편리하다 생각됩니다. 그러나 이미 PC세상에선 네이버가 1위인지라 원래 있던 네이버의 기능을 포터블화 해서 출시하기만 해도 중박 이상을 칠 것으로 보입니다. 한마디로 말해 나중에는 먼저 시장에 뛰어든 다음을 뛰어 넘을 가능성이 있다는 이야기입니다.<br /><br /></font><br /><ul><li><font style="font-weight: bold;" size="6"><span style="color: rgb(255, 102, 0);">앞으로는 어떻게 될까?</span></font></li></ul><br /><font size="3">네이버는 이미 성공을 거둔 회사입니다. 앞에서 계속 말했던 것처럼 그냥 이대로 간다면 다음을 뛰어넘을 것입니다. 하지만 이 산업은 IT 산업이므로, 2위만이 할 수 있는 멋진 생각들(창의적인 생각)로 무장한 다음에게 한방에 망할 수 도 있는게 이 시장입니다. 결국 먼저 유저의 마음을 알고 유저를 위하는 어플을 많이 출시하는 쪽이 이기겠지요. 너무 당연한 이야기인가요 ^^? 아무튼 이렇게 대형 포털들이 모바일에 뛰어든다는 것이 모바일 시장의 위력을 인정했다고 하는 이야기나 같은 이야기이므로, 모바일이 많이 성장했다는 느낌이 듭니다. 또 이렇게 계속 한국 회사들이 많이 참가하였으면 좋겠습니다. 제 생각에도 모바일 시장은 정말 멋진 곳 이거든요.</font><br /><br /><br /><br /><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com10tag:blogger.com,1999:blog-6332394202775912912.post-122803110474071062009-07-09T17:13:00.000+09:002011-01-29T22:25:58.901+09:00아이팟 락스크린 테마 - 멀티바 락스크린<div style="text-align: center;"><img class="postimg" src="http://labs.spiqr.nl/upload/files/3439c8defd10054b2c3ef39d0a0809fd5acdc5e2.png" alt="http://labs.spiqr.nl/upload/files/3439c8defd10054b2c3ef39d0a0809fd5acdc5e2.png"><br /></div><br /><div style="text-align: center;"><a href="http://labs.spiqr.nl/upload/files/62e4b5d039472f546310147254753862f8dd95eb.zip" target="_blank"><strong>Download v1.6.6</strong></a><br /></div><br /><br />락스크린에 여러가지 일정과 정보들을 설치하는 테마 입니다<br />파일 내부를 보시면 감이 오실것이고,<br />시디아에서도 multi bar 라고 치시면 나올것입니다. (ModMyI-repo)<br /><br /><br /><div style="text-align: center;"><br /><img class="postimg" src="http://labs.spiqr.nl/upload/files/1e2be21609fbd246a272ced87b79c22f3c7250af.png" alt="http://labs.spiqr.nl/upload/files/1e2be21609fbd246a272ced87b79c22f3c7250af.png"><br />12시간 시계<br /><img class="postimg" src="http://labs.spiqr.nl/upload/files/4901648634a8a5ecd817345bf54e1f86533b751b.png" alt="http://labs.spiqr.nl/upload/files/4901648634a8a5ecd817345bf54e1f86533b751b.png"><br />24시간시계<br /><br /></div><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-70076404003289964002009-07-09T16:56:00.000+09:002011-01-29T22:25:58.857+09:00[아이팟 Theme] ILLUMINE<div style="text-align: center;"><img class="postimg" src="http://i42.tinypic.com/2ymc7zr.png" alt="http://i42.tinypic.com/2ymc7zr.png"><br /></div><br /><strong>Download:</strong> <a href="http://kon.deviantart.com/art/illumine-125260861" target="_blank">http://kon.deviantart.com/art/illumine-125260861</a><br /><br /> 외국 아이폰 포럼에서 구한 테마입니다. <br /><br />심플한게 보기 좋습니다. <br /><br />추가 아이콘(압축 풀어보시면 그다시 많은 아이콘은 있지 않습니다)과 여러 의견들을 보실려면 <br /><br /><a target="_blank" href="http://macthemes2.net/forum/viewtopic.php?id=16796363&p=1">외국 아이폰 포럼의 글타래</a>를 참조하세요<br /><br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com0tag:blogger.com,1999:blog-6332394202775912912.post-29605537425366853392009-07-06T22:44:00.000+09:002011-01-29T22:25:58.751+09:00Iphone 3GS 전파인증 통과<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XXSDNpBrQq.jpg" style="width:500px;height:246px;" alt="" /></div>떡밥이 하나 더 늘었습니다. <br /><br />이거 정말 출시되는건가요?<br /><br />자문자답하자면 저는 '안된다' 라고 말하고 싶습니다. 우리에게 보급해주는 통신사가 지금 이꼴인 이상 애플의 요구를 다 들어줄지 의문이거든요.. 그래도 나오면 삽니다!<br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com3tag:blogger.com,1999:blog-6332394202775912912.post-90513296819502162442009-07-04T18:53:00.000+09:002011-01-29T22:25:58.656+09:00PS3에서 TP/TS파일 감상하기<script src='http://ss.textcube.com/service/blog/script/blogger.js' type='text/javascript'></script>안녕하세요.<br /><br /> 보통 방송을 녹화한 무손실 파일들 (TP/TS)등을 플삼에서 돌릴 필요가 있을때가 있습니다. <br /><br />그러나 컴을 켜놓고 미디어서버로 보기엔 컴퓨터 전기 잡아먹는게 아깝다 생각하시는 분에게 좋은 방법입니다. 그리고 아래의 내용은 그냥 컨테이너만 바꾸는 작업이므로 인코딩은 오래 걸리지 않습니다. 제가 싱글코어인데 8기가 짜리 파일이 10분 걸리네요..<br /><br />1. HDTV to MPEG2를 이용해 mpeg로 변환해 보기<br /><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XSFHPlWhfZ.jpg" style="width:640px;height:572px;" alt="" onclick="TC$PRIV_open_img('http://ss.textcube.com/blog/1/15119/attach/XSFHPlWhfZ.jpg')" /></div><br /><div class="imageblock center" style="text-align: center; clear: both;"><a href="http://ss.textcube.com/blog/1/15119/attach/XNtbCgFN43.zip/HDTVtoMPEG2_v1.11.94.zip" rel="enclosure" ><img src="http://ss.textcube.com/service/blog/image/extension/zip.gif" alt="" style="vertical-align: middle;" /> HDTVtoMPEG2_v1.11.94.zip</a></div><br />별다른 설정은 필요 없구요. 단지 볼 수 있게만 하고싶은분은 파일 추가하시고 MPEG2로 설정, 맥스 사이즈는 4기가 이하로 합니다. (Fat32 외장하드를 사용하므로)<br />이 방법이 안되시는 분은 두번째 방법을 시도해보시는 것도 좋습니다.<br />끝으로 output 폴더를 설정해 줍니다. (...)<--클릭<br /><br />2. VLC media player로 mpeg로 변환해 보기<br /><a target="_blank" href="http://www.videolan.org/vlc/"><br />http://www.videolan.org/vlc</a> 사이트에 들어가셔서 자신의 운영체제에 맞는 프로그램을 설치 합니다.<br /><br />그다음 원하는 파일을 불러오신 후 Ctrl + W 를 누르셔서 위자드를 실행시킵니다.<br /><br /><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XS3cXr3QvH.jpg" style="width:438px;height:532px;" alt="" /></div><br /><br />Transcode/Save to file을 채크하신 후 넥스트를 클릭합니다.<br /><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XPZoeoS6fS.jpg" style="width:420px;height:524px;" alt="" /></div><br /><br />불러오신 파일을 클릭하신 후, 넥스트를 클릭합니다.<br /><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XUuRj8WSXx.jpg" style="width:441px;height:549px;" alt="" /></div><br /><br />아무것도 체크하지 않습니다. 넥스트를 클릭합니다<br /><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XSM8UthDCi.jpg" style="width:448px;height:554px;" alt="" /></div><br /><br />MPEG PS를 클릭합니다.<br /><br /><div class="imageblock center" style="text-align: center; clear: both;"><img src="http://ss.textcube.com/blog/1/15119/attach/XXDPt1BxE3.jpg" style="width:460px;height:585px;" alt="" /></div><br /><br />저장하고 싶은 폴더를 가셔서 파일명을 설정해 줍니다. (****.mpg 또는 mpeg를 합니다)<br /><br /><br />피니시를 클릭하시고 기다리시면 완료 됩니다. 이제 감상만 하시는 일만 남았습니다 !<br /><br /><br />혹시 안되시는 파일 있으시면 덧글 부탁드립니다 ^^;<br />Universewalkerhttp://www.blogger.com/profile/12462760784480833837noreply@blogger.com4