#include "stdafx.h"
#include
#include

class 한글
{

};

int main()
{
   setlocale(LC_ALL, "");

   한글 obj;
   const char *str = typeid(obj).name();

   int i = 0;
   unsigned char ch;

   while (true)
   {
      ch = str[i];

      if (ch == 0)
         break;

      printf("str[%2d] is ", i);

      if (0x20 <= ch && ch <= 0x7E)
      {
         printf("%c\n", ch);
         i++;
      }
      else
      {
         wchar_t korean = (ch & 0b1111) << 12;

         korean |= (str[i + 1] & 0b111111) << 6;
         korean |= str[i + 2] & 0b111111;

         wprintf(L"%c\n", korean);

         i += 3;
      }
   }

   return 0;
}