¿¹Á¦

ÀÌ ¿¹Á¦¿¡¼­´Â foo¶ó´Â À̸§ÀÇ µÎ °³ÀÇ ÇÔ¼ö°¡ ¼­·Î ¿À¹ö·ÎµåÇÕ´Ï´Ù. ÀÌ·± °æ¿ì ¿¹»óÄ¡ ¸øÇÑ µ¿ÀÛÀ» ¹ß»ý½Ãų ¼ö ÀÖ½À´Ï´Ù.

template<class T> class MyClass {
   public:
      int foo(T type);
      int foo(int b);
};

¼Ö·ç¼Ç

¼Ö·ç¼ÇÀº ¾Æ·¡ÀÇ ¿¹Ã³·³ Ư¼öÈ­µÈ ÇÔ¼ö¸¦ ¾²°Å³ª Äڵ忡¼­ ¸ðÈ£¼ºÀ» Á¦°ÅÇϴ Ư¼öÈ­µÈ ÇÔ¼ö ÅÛÇø®Æ®¸¦ »ç¿ëÇÏ´Â °ÍÀÔ´Ï´Ù.

template<class T> class MyClass {
   public:
      int fncType(T type);
      int fncInt(int b);
};