<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>화살표연산자 on Sobamemil</title>
    <link>https://blog.sobamemil.com/tags/%ED%99%94%EC%82%B4%ED%91%9C%EC%97%B0%EC%82%B0%EC%9E%90/</link>
    <description>Recent content in 화살표연산자 on Sobamemil</description>
    <generator>Hugo</generator>
    <language>ko</language>
    <lastBuildDate>Wed, 04 Mar 2020 15:05:27 +0900</lastBuildDate>
    <atom:link href="https://blog.sobamemil.com/tags/%ED%99%94%EC%82%B4%ED%91%9C%EC%97%B0%EC%82%B0%EC%9E%90/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>명품 C&#43;&#43; programming 실습 문제 4장 1번</title>
      <link>https://blog.sobamemil.com/posts/055-%EB%AA%85%ED%92%88-c-programming-%EC%8B%A4%EC%8A%B5-%EB%AC%B8%EC%A0%9C-4%EC%9E%A5-1%EB%B2%88/</link>
      <pubDate>Wed, 04 Mar 2020 15:05:27 +0900</pubDate>
      <guid>https://blog.sobamemil.com/posts/055-%EB%AA%85%ED%92%88-c-programming-%EC%8B%A4%EC%8A%B5-%EB%AC%B8%EC%A0%9C-4%EC%9E%A5-1%EB%B2%88/</guid>
      <description>&lt;p&gt;&lt;strong&gt;문제 :&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;다음은 색의 3요소인 red, green, blue로 색을 추상화한 Color 클래스를 선언하고 활용하는 코드이다. 빈칸을 채워라.&lt;/p&gt;
&lt;p&gt;red, green, blue는 0~255의 값만 가진다.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;&lt;/th&gt;
          &lt;th&gt;&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31&lt;/td&gt;
          &lt;td&gt;#include&lt;iostream&gt;  using namespace std;    class Color {  int red, green, blue;  public:  Color() {red = green = blue = 0;}  Color(int r, int g, int b) {red = r; green = g; blue = b;}  void setColor(int r, int g, int b) {red = r; green = g; blue = b;}  void show() {cout &amp;laquo; red &amp;laquo; &amp;rsquo; &amp;rsquo; &amp;laquo; green &amp;laquo; &amp;rsquo; &amp;rsquo; &amp;laquo; blue &amp;laquo; endl;}  };    int main() {  Color screenColor(255,0,0); // 빨간색의 screenColor 객체 생성  Color *p;     // Color 타입의 포인터 변수 p 선언  ＿＿＿＿＿    // (1) p가 screenColor의 주소를 가지도록 코드 작성  ＿＿＿＿＿    // (2) p와 show()를 이용하여 screenColor 색 출력  ＿＿＿＿＿    // (3) Color의 일차원 배열 colors 선언. 원소는 3개  ＿＿＿＿＿    // (4) p가 colors 배열을 가리키도록 코드 작성    // (5) p와 setColor()를 이용하여 colors[0], colors[1], colors[2]가  // 각각 빨강, 초록, 파랑색을 가지도록 코드 작성  ＿＿＿＿＿  ＿＿＿＿＿  ＿＿＿＿＿    // (6) p와 show()를 이용하여 colors 배열의 모든 객체의 색 출력. for 문 이용  ＿＿＿＿＿  ＿＿＿＿＿  ＿＿＿＿＿  }&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;목적 및 힌트 :&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
