ÇÁ·Î±×·¡¹Ö
ù ÆäÀÌÁö ·£´ý ±Û ȸ¿ø°¡ÀÔ ·Î±×ÀÎ
ºñ°ø°³ ¼Õ´Ô ¡¦ 2016-10-31 20:30:05
URL https://te31.com/rgr/view.php?id=study&no=2039 ¸ð¹ÙÀÏ È­¸é
ÇÔ¼öÇü ÀÚ·áÇü¿¡ & ºÙÀ̴°Š¹¹¿¡¿ä..? ÷ º¸´Â°Í°°Àºµ¥;

class firstclass
{
    firstclass();
public:
    static firstclass& GetInstance()
    {
        static firstclass ins;
        return ins;
    }
};

class secondclass
{
    secondclass();
public:
    static secondclass* GetInstance()
    {
        static secondclass ins;
        return &ins;
    }
};

firstclass´Â Æ÷ÀÎÅ͸¦ »ç¿ëÇÏÁö ¾Ê°í ÁÖ¼Ò°ªÀ» ¹Þ´Â ¹æ½Ä
secondclass´Â Æ÷ÀÎÅ͸¦ »ç¿ëÇÏ´Â ¹æ½Ä
À̶ó°í ½áÀÖ±ä Çϴµ¥

firstclassÇغôµ¥ ÁÖ¼Ò°ª ¾È¹Þ°í ±×³É °ªÀ» ¹Þ³×¿ä
ÇÔ¼öÇü¿¡ & ºÙ´Â°É óÀ½ º¸´Â°Í°°Àºµ¥
Ȥ½Ã ¾Æ½Ã´ÂºÐ °è½Å°¡¿ä?

Àâ´ã | 1352¸íÀÌ Àоú¾î¿ä. 18.116.42.233

0
1 ºñ°ø°³ ¼Õ´Ô ¡¦ 2016-10-31 20:32:01
¸®ÅÏ°ªÀÌ reference....
c++ ±âº»Ã¥À» ´Ù½Ã º¸½Ã´Â°É ÃßõÇÕ´Ï´Ù
ÀÚ·áÇüÀº ÀÏ¹Ý ÀÚ·áÇü, Æ÷ÀÎÅÍ, ·¹ÆÛ·±½º 3°³·Î ±¸ºÐµÇ´Âµ¥
* °¡ Æ÷ÀÎÅÍ, &°¡ ·¹ÆÛ·±½º
¾Æ·¡´Â ±¸±Û °Ë»ö Á© ù¹ø° ÇÑ±Û ºí·Î±×¿¡¿µ ÂüÁ¶ÇÏ½Ã¸é µÉ°Í °°¾Æ¿ä
http://blog.eairship.kr/170
2 ºñ°ø°³ ¼Õ´Ô ¡¦ 2016-10-31 20:54:16
Áú¹®ÇÏ¸é ¿ì¼± ÀÌ·±¸»ºÎÅÍ µè´Â±º¿ä¤Ð¤Ð

Ã¥¿¡ º¸¸é º¸Åë
int a = 3;
int& b = a;
ÀÌ·±½ÄÀ¸·Î¸¸ ³ª¿À°í

int c = b;
ÀÌ·±½ÄÀ¸·Î ¹Þ´Â°Ç º»ÀûÀÌ ¾ø¾î¼­ Áú¹®µå·È¾ú¾î¿ä

int c = b; ÀÌ·¸°Ô ¹ÞÀ¸¸é ±×³É °ª¹Þ°í
int& c = b; ÀÌ·¸°Ô ¹ÞÀ¸¸é ÂüÁ¶ÇÏ°í Çϳ׿ä
3 ºñ°ø°³ ¼Õ´Ô ¡¦ 2016-10-31 21:02:28
Æ÷ÀÎÅÍ vs ÂüÁ¶
´ñ±ÛÀ» ÀÛ¼ºÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.
(±ÇÇÑÀÌ ¾ø´Â ȸ¿ø·¹º§)
¸ñ·ÏÀ¸·Î
¡â ÀÌÀü±Û: ¿À Çѱ¹¾î·Î ÄÚµù°¡´ÉÇÑ ¾ð¾îµµ ³ª¿Ô³×¿ä GNE [4]
¡ä ´ÙÀ½±Û: Áú¹®±Û ¾²´Ù°¡ ÇØ°á¹ý »ý°¢³ª¼­ Áö¿üÀ½ [2]
ÀÌ¿ë¾à°ü | ±¤°í/Á¦ÈÞ | °³ÀÎÁ¤º¸Ãë±Þ¹æħ | ¹®ÀÇ/½Å°í | ¸ð¹ÙÀÏ TE31 | ¼­¹ö ºÎÇÏ : 12.75%
½Ç½Ã°£ Issue Ä¿¹Â´ÏƼ TE31 [¾ËÁö·Õ] ¨Ï 2002-2024
TOP arrow_upward