|
||
![]() |
![]() ![]()
list
ÀÌ·¸°Ô ¼±¾ð ÇϼÌÀ» °Å°í Object_info.push(prim);½ÄÀ¸·Î ³ÖÀ¸¼Ì´Ù¸é list for(it = Object_info.begin(); it!=Object_info.end; ++it) it¿¡ ¼±¾ðÇϽŠObject_info ºñ±äÀ» ³ÖÀ¸½Ã°í ³¡ÀÌ ¾Æ´Ò¶§±îÁö Æ÷¹®À» µµ½Ã¸é¼ { °£´ÜÇÏ°Ô´Â it¸¦ Æ÷ÀÎÅͶó »ý°¢ÇϽðí it->init_x; ÀÌ·¸°Ô Á¢±Ù Çϼŵµ µÇ°í (*it).init_x; ÀÌ·¸°Ô Á¢±Ù Çϼŵµ µÇ´Âµ¥ Á¢±ÙÁ¦ÇÑÀÚ°¡ PRIVATEÀ̱⠶§¹®¿¡ GETTER¶û SETTER¸¸µå¼Å¼ ÇÏ½Ã¸é µÉ °Í °°½À´Ï´Ù. } |
![]() |
![]() ![]()
¾ÆÇÏ! ³» ±×·¡¼ get°ú setÀº ±¸ÇöÇسõ¾Ò¾î¿ä!
Á¦°¡ Æ÷ÀÎÅÍ¿¡ ´É¼÷ÇÏÁö ¸øÇؼ Àß Ã£¾Æº¸Áú ¸øÇß¾ú³ªºÁ¿ä ¤Ð¤Ð µµ¿òÁֽŹæ¹ýÀ¸·Î ÀÏ´Ü ¸ÕÀú getter setter ÀÌ¿ëÇؼ Æ÷ÀÎÅÍ Á¢±Ù ½Ãµµ ÈÄ¿¡ À§¿¡ºÐ²²¼ µµ¿ÍÁֽŠº¤Å͵µ ÀÌ¿ëÇØ º¸°Ú½À´Ï´Ù!! |
![]() |
![]() ![]()
¾Æ Ȥ½Ã³ª ÇÑ°¡Áö ´õ¿ä!
À½... Á¦°¡ init_x¸¦ °¡Á®¿À´Â getter¸¦ get_init_x() ·Î ±¸ÇöÀ» ÇØ ³õ¾Ò´Âµ¥¿ä ±×·¸´Ù¸é it->get_init_x(); ÀÌ·±½ÄÀ¸·Î Çϸé init_x´Â ¾îµð¿¡ ÀúÀåÀÌ µÇ´Â °Ç°¡¿ä?¤Ð.¤Ð |
![]() |
![]() ![]()
´ç¿¬È÷ init_x º¯¼ö¸¦ ÀúÀåÇÒ º¯¼ö°¡ ÀÖ¾î¾ß°ÚÁÒ;;
int loaded_init_x = it->get_init_x(); ÀÌ·±½ÄÀ¸·Î¿ä. |
![]() |
![]() ![]()
it->get_init_x()
it->set_init_x(~~~) ÀÌ·±½ÄÀ¸·Î ÇÏ¸é µÇ´Â±º¿ä!¤¾¤¾¤¾¤¾ |
![]() |
![]() ![]()
³×!!
Ãʺ¸¶ó È¥ÀÚ °í¹Î°í¹ÎÇÏ´Ù°¡.......................Èå±Ø¤Ð^¤Ð |
|
|
![]() |
![]() | ¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û | ¸ñ·Ïº¸±â | ![]() |
Àú³á¸Ô°í ÀÌÁ¦ µ¹¾Æ¿Ô´Âµ¥ Ä£ÀýÇÑ ´äº¯À»!!!!
Çѹø ½ÃµµÇغ¸°Ú½À´Ï´Ù!!!! ^-^