Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > b611ea73723a8287cce23d3124a6eeea > files > 17

howto-sgml-ko-2006-5mdv2010.0.noarch.rpm

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<Article lang="ko">

<Articleinfo>

<Title>C++ Programming HOW-TO</Title>
<AUTHOR lang="en">
<FirstName>Al Dev (Alavoor Vasudevan)        </FirstName>
<surname></surname>

  <affiliation>
    <address>
      <email>alavoor (at) yahoo.com</email>
    </address>
  </affiliation>
</AUTHOR>

<othercredit role="translator">
  <firstname>Áö¿ë</firstname>
  <surname>Á¤</surname>
  <affiliation>
    <address>
      <email>ways (at) gon.kaist.ac.kr</email>
    </address>
  </affiliation>
</othercredit>

<revhistory>
<revision>
  <revnumber>41.8</revnumber>
  <date>2002-03-31</date>
  <authorinitials>Á¤Áö¿ë</authorinitials>
  <revremark>
    ¼öÁ¤ÆÇ ¹ø¿ª
  </revremark>
</revision>
<revision>
  <revnumber>5.0</revnumber>
  <date>2000-06-15</date>
  <authorinitials>±èÁöÈñ, À±ÁÖö</authorinitials>
  <revremark>
    ÃÖÃÊ ¹ø¿ª
  </revremark>
</revision>
</revhistory>

<Abstract>

<Para>
ÀÌ ¹®¼­´Â C++¿¡ °üÇÑ URL°ú C++ online Ã¥¿¡ ´ëÇÑ ¸µÅ©, C++ ÇÁ·Î±×·¡¹Ö ÆÁ µîÀ» Æ÷°ýÀûÀ¸·Î Á¦°øÇÑ´Ù. ÀÌ ¹®¼­´Â C++¿¡¼­ °Þ´Â ´Ù¾çÇÑ ¸Þ¸ð¸® °ü·Ã ¹®Á¦¸¦ ÇØ°áÇØÁÖ´Â Java¿Í ºñ½ÁÇÑ libraryµµ Á¦°øÇÑ´Ù. ÀÌ library¸¦ ÀÌ¿ëÇϸé, java ¼Ò½ºÄڵ带 C++·Î ÄÄÆÄÀÏ ÇÒ ¼öµµ ÀÖ´Ù. ÀÌ ¹®¼­´Â "C++ ¾ð¾îÀÇ Áý"¿ªÇÒÀ» ÇÑ´Ù.
ÀÌ ¹®¼­¿¡¼­ Á¦°øµÇ´Â Á¤º¸´Â C++ ¾ð¾î¸¦ ÀûÀýÈ÷ »ç¿ëÇÏ°í ¸ðµç ¿î¿µÃ¼Á¦ - ¸®´ª½º, MS-DOS, BeOS, Apple Macintosh OS, Microsoft Windows 95/98/NT/2000, OS/2, IBM OSes (MVS, AS/400 µî..), VAX VMS, Novell Netware, À¯´Ð½º-like OSµé(Solaris, HPUX, AIX, SCO, Sinix, BSD µî..)°ú ±âŸ C++À» Áö¿øÇÏ´Â ¸ðµç ¿î¿µÃ¼Á¦(¾Æ¸¶µµ ¼¼»óÀÇ °ÅÀÇ ¸ðµç ¿î¿µÃ¼Á¦°¡ ÀÌ¿¡ ¼ÓÇÒ °ÍÀÌ´Ù) - ¿¡ Àû¿ëÇÏ´Â °ÍÀ» µµ¿ÍÁÙ °ÍÀÌ´Ù.
</Para>

</Abstract>

</Articleinfo>

<Sect1>
<Title>¼­¹®</Title>

<Para>
<Emphasis remap="bf">(ÀÌ ¹®¼­ÀÇ ÃÖ½ÅÆÇÀº <ULink URL="http://www.milkywaygalaxy.freeservers.com">http://www.milkywaygalaxy.freeservers.com</ULink> ¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù)</Emphasis>
</Para>

<Para>
ÀÌ ¹®¼­ÀÇ ¸ñÀûÀº C++¿¡ °üÇÑ URL°ú C++ online Ã¥¿¡ ´ëÇÑ ¸µÅ©, C++ ÇÁ·Î±×·¡¹Ö ÆÁ µîÀ» Æ÷°ýÀûÀ¸·Î Á¦°øÇÏ´Â °ÍÀÌ´Ù. ¶ÇÇÑ, ÀÌ ¹®¼­´Â Java ½ºÅ¸ÀÏÀÇ String class, string tokenizer, ¸Þ¸ð¸® ÇÔ¼öµî ÀϹÝÀûÀÎ C++ ÇÁ·Î±×·¥¿¡¼­ ³Î¸® ¾²ÀÏ ¼ö ÀÖ´Â ¸¹Àº ÇÔ¼öµéÀ» Á¦°øÇÑ´Ù.
C++ °ú Java´Â ¿À´Ã³¯ ¸¹Àº ¼ÒÇÁÆ®¿þ¾î ÇÁ·ÎÁ§Æ®¿¡¼­ ¾²ÀÌ°í ÀÖ´Ù. ÇÁ·Î±×·¡¸Ó´Â C++°ú Java¸¦ ¹ø°¥¾Æ°¡¸ç ¾²°ÔµÉ °ÍÀÌ°í, ÀÌ Java ½ºÅ¸ÀÏÀÇ class°¡ ¸Å¿ì À¯¿ëÇÔÀ» ¾Ë°Ô µÉ °ÍÀÌ´Ù.
ÀÌ library¿Í C++ Ç¥ÁØ ¶óÀ̺귯¸®ÀÇ »ç¿ë¹ýÀ» ¾Ë·ÁÁÙ ´Ù¾çÇÑ ¿¹Á¦°¡ Á¦½ÃµÉ °ÍÀÌ´Ù.
</Para>

<Para>
ÀÌ ¹®¼­´Â C++¿¡ ´ëÇÑ ±³°ú¼­°¡ ¾Æ´Ï¸ç, ÀÌ¿¡ ´ëÇؼ­´Â ÀÌ¹Ì ¸î°¡Áö ÁÁÀº on-line Ã¥µéÀÌ ÀÖ´Ù.
C++ÀÌ ²Ï ¿À·£½Ã°£µ¿¾È »ç¿ëµÇ¾î¿Ô±â ¶§¹®¿¡, ¸Å¿ì ¸¹Àº ¼öÀÇ C++ ¹®¼­/±Û/Æ©Å丮¾óÀÌ ÀÎÅÍ³Ý»ó¿¡ Á¸ÀçÇÑ´Ù.
¸¸¾à ´ç½ÅÀÌ C++À» óÀ½ Á¢ÇÏ´Â °ÍÀÌ°í, C++ ÇÁ·Î±×·¥À» Â¥ º» ÀûÀÌ ¾ø´Ù¸é, <XRef LinkEnd="onlinebooks">Àå¿¡ ¸µÅ©µÇ¾î ÀÖ´Â on-line C++ Ã¥À» ¸ÕÀú Àо°Å³ª, <ULink URL="http://www.amazon.com">Amazon</ULink> À̳ª <ULink URL="http://www.barnesnoble.com">barnes</ULink>°ú °°Àº °÷¿¡¼­  C++ Ã¥À» »ç º¼ °ÍÀ» ÃßõÇÑ´Ù.
</Para>

<Para>
´©±º°¡°¡ ¸»Çßµí - <Emphasis remap="it">C/C++ ¾ð¾î´Â OS³ª µð¹ÙÀ̽ºµå¶óÀ̹ö, ºü¸¥ ÀÀ´äÀ» ÇÊ¿äÇÏ´Â real-time ÇÁ·Î±×·¥µîÀ» ¸¸µå´Â ½Ã½ºÅÛ ¿£Áö´Ï¾î³ª ¾²¶ó°í ÇÏ°í, 
´ç½ÅÀº 2002³âº¸´Ù ÄÄÇ»ÅÍ°¡ ¸î¹é¸¸¹è »¡¶óÁú 2005³âÀ» »ý°¢Çϸé Java³ª PHP-scriptingÀ» ½á¾ßÇÑ´Ù.</Emphasis>
Çϵå¿þ¾î ´Â Á¡Á¡ ½Î¸é¼­µµ, »¡¶óÁø´Ù.
</Para>

<Sect2>
<Title> C++ ÇÁ·Î±×·¥? C++ vs. Java/PHP</Title>

<Para>
C++Àº °¡Àå °­·ÂÇÑ ¾ð¾îµé Áß ÇϳªÀÌ°í, Java³ª PHP-scripting °°Àº °ÍÀÌ ³ªÅ¸³µÁö¸¸, ¾ÕÀ¸·Îµµ ¿À·£ ½Ã°£µ¿¾È ¾²ÀÌ°Ô µÉ °ÍÀÌ´Ù.
½Ç½Ã°£ÀÇ ¸Å¿ì ºü¸¥ ÀÀ´äÀ» ÇÊ¿äÇÏ´Â ÇÁ·Î±×·¥Àº C³ª C++À» ¾´´Ù.
C++Àº <Emphasis remap="bf">¸Å¿ì ºü¸£°Ô</Emphasis>µ¿ÀÛÇÏ°í, 
½ÇÁ¦·Î Javaº¸´Ù <Emphasis remap="bf"> 10¹è¿¡¼­ 20¹è Á¤µµ ºü¸£´Ù </Emphasis>.  
Java´Â C++ÀÇ "ÀÚ¼Õ"ÀÌ´Ù.
JavaÀÇ ´Ü ÇϳªÀÇ ¹®Á¦Á¡Àº ¹Ù·Î - <Emphasis remap="it">"Java ´Â ´À¸®´Ù!!" </Emphasis>.
VMÀ§¿¡¼­ µµ´Â Java ¹ÙÀÌÆ®ÄÚµå´Â ÄÄÆÄÀÏµÈ ½ÇÇàÄڵ庸´Ù ´À¸®´Ù.
Java´Â JIT(Just-In-Time) ÄÄÆÄÀÏ·¯À§¿¡¼­ ´õ ºü¸£°Ô µ¹Áö¸¸, ¿©ÀüÈ÷ C++º¸´Ù´Â ´À¸®´Ù.
ÃÖÀûÈ­ µÈ C/C++ ÇÁ·Î±×·¥Àº JIT ³ª ±× ÀÌÀüÀÇ ÄÄÆÄÀÏ·¯·Î ÄÄÆÄÀÏ µÈ Java Äڵ庸´Ù 
¾à  <Emphasis remap="bf">3 ¿¡¼­ 4¹è Á¤µµ ºü¸£´Ù</Emphasis>!!
±×·¸´Ù¸é, ¿Ö »ç¶÷µéÀÌ Java¸¦ ¾²´Â°¡? ÀÌ´Â Java°¡ ¼ø¼öÇÑ °´Ã¼ÁöÇâÀ» Áö¿øÇÏ°í, JavaÀÇ ÀÚµ¿È­µÈ ¸Þ¸ð¸® °ü¸®·Î ÀÎÇØ ÇÁ·Î±×·¡¹ÖÇϱⰡ ½¬¿ì¸ç, ÇÁ·Î±×·¡¸ÓµéÀÌ Á÷Á¢ ¸Þ¸ð¸® °ü¸®Çϱ⸦ ½È¾îÇϱ⠶§¹®ÀÌ´Ù.
ÀÌ ¹®¼­´Â C++ÀÇ ¸Þ¸ð¸® °ü¸®¸¦ ÀÚµ¿È­ÇÏ¿© ÈξÀ »ç¿ëÇϱ⠽±°Ô ÇÏ°íÀÚ Çß´Ù.
¿©±â¼­ ³ª¿À´Â library´Â C++À» Java ¸¸Å­ ½±°Ô ´À³¢°Ô ÇØÁÙ °ÍÀÌ°í, C++ÀÌ Java¿Í °æÀïÇÒ ¼ö ÀÖµµ·Ï ÇØÁÙ °ÍÀÌ´Ù.
</Para>

<Para>
¼öµ¿ÀûÀÎ ¸Þ¸ð¸® °ü¸®¸¦ À§ÇØ C++ ÇÁ·Î±×·¥ µð¹ö±ëÀÇ ´ëºÎºÐ ½Ã°£ÀÌ ¼Ò¸ðµÈ´Ù.
ÀÌ ¹®¼­´Â µð¹ö±ë ½Ã°£À» ÁÙÀ̱â À§ÇÑ ¸î°¡Áö ¾ÆÀ̵ð¾î¿Í ÆÁÀ» ÁÙ °ÍÀÌ´Ù.
</Para>

<Para>
¾ðÁ¦ C++À» ½á¾ßÇÏ°í ¾ðÁ¦ Java/PHP¸¦ ½á¾ßÇϴ°¡?
</Para>

<Para>
¾Æ·¡¿Í °°Àº °æ¿ì¿£ C++À» ½á¶ó:
<ItemizedList>
<ListItem>

<Para>
½ÇÇà¼Óµµ¿Í ¼º´ÉÀÌ ¸Å¿ì Áß¿äÇÑ ÇÁ·Î±×·¥À» ¸¸µé ¶§.
</Para>
</ListItem>
<ListItem>

<Para>
¸¸µå´Â ÇÁ·Î±×·¥ÀÇ »ç¿ëÀÚ ¼ö°¡ ¸¹À» ¶§. C++Àº ÄÄÆÄÀÏ-¸µÅ·-µð¹ö±ë »çÀÌŬÀÌ ÇÊ¿äÇϱ⠶§¹®¿¡, ÇÁ·Î±×·¥ °³¹ß¿¡ ´õ ¸¹Àº ½Ã°£ÀÌ ¼Ò¿äµÈ´Ù.
µû¶ó¼­ »ç¿ëÀÚ¼ö°¡ ÃæºÐÈ÷ ¸¹À» ¶§¿¡³ª Àû´çÇÏ´Ù. ½ÇÇàÆÄÀÏÀ» ¸¸µé±â À§ÇØ ¸¹Àº ¼öÀÇ objectÆÄÀÏÀ» ¸µÅ©ÇÏ´Â °ÍÀº ²Ï ½Ã°£ÀÌ °É¸°´Ù. 
(¸µÅ©Çϴµ¥ °É¸®´Â ½Ã°£À» ÁÙÀ̱â À§ÇØ archive³ª ¶óÀ̺귯¸®, °øÀ¯ ¶óÀ̺귯¸®¸¦ »ç¿ëÇÒ ¼öµµ ÀÖ´Ù.)
</Para>
</ListItem>
<ListItem>

<Para>
C++ÇÁ·Î±×·¡¹Ö °æÇèÀÌ ¸¹À» ¶§.
</Para>
</ListItem>

</ItemizedList>

Java/PHP¸¦ ½á¾ßÇÒ °æ¿ì:

<ItemizedList>
<ListItem>

<Para>
(C/C++·Î ÀÛ¼ºµÇ´Â °Í¿¡ ºñÇؼ­) ½ÇÇà¼Óµµ¿Í ¼º´ÉÀÌ Áß¿äÇÏÁö ¾ÊÀ» ¶§.
</Para>
</ListItem>
<ListItem>

<Para>
»ý»ê ºñ¿ëÀ» ³·Ãß±â À§ÇØ - ÄÄÆÄÀÏ-¸µÅ© »çÀÌŬÀÌ ¾ø±â ¶§¹®¿¡, Java/PHP´Â C++º¸´Ù  °³¹ßÀÌ ºü¸£´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 ºü¸¥ °³¹ßÀÌ ÇÊ¿äÇÒ ¶§.
</Para>
</ListItem>
<ListItem>

<Para>
ÄÚµå À¯Áöº¸¼ö¸¦ ½±°Ô Çϱâ À§ÇØ. C++ À» À¯Áöº¸¼öÇÏ´Â °ÍÀÌ Java³ª PHP-scripting º¸´Ù ÈξÀ ¾î·Æ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
Java¿Í PHP-scriptingÀº ¹Ì·¡ÀÌ´Ù, Çϵå¿þ¾îÀÇ ¼Óµµ´Â ºÐÀÚ¿Í ¿øÀÚ, ¿øÀÚº¸´Ù ÀÛÀº Å©±âÀÇ ÄÄÇ»ÅÍ µµÀÔ°ú ÇÔ²² ±ÞµîÇÒ °ÍÀÌ´Ù. 
¹Ì·¡ÀÇ ÄÄÇ»ÅÍ´Â ¿À´Ã³¯ ÄÄÇ»ÅÍÀÇ ¼öÁ¶¹èÀÇ ¼º´ÉÀ» °¡Áú °ÍÀÌ´Ù. ¹Ì·¡¿¡ Çϵå¿þ¾î ¼º´ÉÀÌ Áøº¸ÇÔ°ú ÇÔ²², Java³ª PHP-scriptÀÇ ½ÇÇà ¼º´ÉÀº Áß¿äÄ¡ ¾Ê°Ô µÉ °ÍÀÌ´Ù.
¿À´Ã³¯ ´ç½ÅÀÌ ¾²´Â ÄÄÇ»ÅÍ(ÇöÀç´Â 2002³âÀÌ´Ù.)´Â ¾öû³ª°Ô ´À¸®°í, ±â¾î°¡°í ÀÖÀ¸¸ç, ÃæºÐÈ÷ ºü¸£Áö ¸øÇÏ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
NOTE: Java ÄÄÆÄÀÏ·¯ (JIT ³ª ´Ù¸¥ °Íµé)¿¡ ¸¹Àº Áøº¸°¡ ÀÖ¾ú´Ù. Java ÇÁ·Î±×·¥Àº GNU GCJ <ULink URL="http://gcc.gnu.org/java" >http://gcc.gnu.org/java</ULink>·Î ÄÄÆÄÀÏ µÉ ¼ö ÀÖ´Ù.
GCJ´Â °£ÆíÇÏ°í, ÃÖÀûÈ­µÇ¾îÀÖÀ¸¸ç, Áøº¸ÀûÀÎ Java ÇÁ·Î±×·¡¹Ö ¾ð¾î¸¦ À§ÇÑ  ÄÄÆÄÀÏ·¯ÀÌ´Ù.
GCJ´Â Java source Äڵ带 ¸Ó½Å ÄÚµå·Î ¹Ù·Î ÄÄÆÄÀÏ ÇÒ ¼öµµ ÀÖ°í, Java ¹ÙÀÌÆ®ÄÚµå(class file)·Î ÄÄÆÄÀÏ ÇÒ ¼öµµ ÀÖ´Ù.
</Para>

<Para>
GCJ Á¤º¸:

<ItemizedList>
<ListItem>

<Para>
GNU GCJ ȨÆäÀÌÁö<ULink
URL="http://gcc.gnu.org/java"
>http://gcc.gnu.org/java</ULink>,
</Para>
</ListItem>
<ListItem>

<Para>
GNU GCJ ÀÇ Redhat RPM
<ULink
URL="http://www.redhat.com/apps/download"
>http://www.redhat.com/apps/download</ULink>. 
¿©±â·Î °¡¼­ "Find lastest RPMs" section¿¡¼­ 'gcc-java'¿Í 'libgcj'·Î 
searchÇÏ¸é µÈ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 Redhat GCJ ¼³Ä¡ °¡À̵å
<ULink
URL="http://www.redhat.com/devnet/articles/gcj.pdf"
>http://www.redhat.com/devnet/articles/gcj.pdf</ULink>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

<Sect2>
<Title>¾î¶² °ÍÀ» ¼±ÅÃÇÒ °ÍÀΰ¡. Ada95, C, C++, Java ¾Æ´Ï¸é PHP? </Title>

<Para>
¾ð¾îÀÇ ¼±ÅÃÀº ¾î·Á¿î ÀÏÀÌ´Ù. ¿©±â¿£ ³Ê¹«³ª ¸¹Àº °í·ÁÇÒ »çÇ×ÀÌ ÀÖ´Ù - °³¹ßÀÚ,
»ç¶÷ÀÇ ´É·Â, ºñ¿ë, Åøµé, Á¤Ã¥ (±¹°¡ÀÇ Á¤Ä¡ Á¤Ã¥±îÁöµµ), »ç¾÷°¡³ª ȸ»çµé¿¡ ´ëÇÑ
¿µÇâ±îÁö.
±â¼úÀûÀÎ ÀÌÀ¯·Î´Â ÃÖÀûÀÇ ¾ð¾îÀÏÁö¶óµµ ´Ü¼øÈ÷ Á¤Ä¡ÀûÀÎ °áÁ¤À¸·Î ÀÎÇØ ¼±ÅõÇÁö
¸øÇÒ ¼öµµ ÀÖ´Ù.
</Para>

<Para>
David WheelerÀÇ ¾ð¾î ºñ±³¸¦ º¸ÀÚ.
<ULink
URL="http://www.adahome.com/History/Steelman/steeltab.htm"
>Ada ºñ±³ Â÷Æ®</ULink>.
Ada°¡  93&percnt;, Java´Â 72&percnt;, C++Àº 68&percnt; C´Â 53&percnt;À» °¢°¢  ¹Þ¾Ò´Ù. 
C++°ú Java´Â Á¡¼ö¸é¿¡¼­´Â ºñ½ÁÇÏ´Ù (4&percnt; Â÷ÀÌ).
AdaÀÇ °³¹ß ºñ¿ëÀº 
<ULink
URL="http://sw-eng.falls-church.va.us/AdaIC/docs/reports/cada/cada_art.html"
>Stephen F. Zeigler</ULink
>¿¡ µû¸£¸é C++ÀÇ ¹ÝÀýÀÌ´Ù.


Ada95´Â ¾Æ·¡¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù - 
<ItemizedList>
<ListItem>

<Para>
 Ada ȨÆäÀÌÁö <ULink
URL="http://www.gnuada.org"
>http://www.gnuada.org</ULink>.
</Para>
</ListItem>
<ListItem>

<Para>
 Google <ULink
URL="http://directory.google.com/Top/Computers/Programming/Languages/Ada"
>Ada index</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
C++ ÄÄÆÄÀÏ·¯´Â C ÄÄÆÄÀÏ·¯º¸´Ù ÈξÀ º¹ÀâÇÏ°í, C++Àº Cº¸´Ù ¾à°£ ´À¸®°Ô µ¿ÀÛÇÒ
¼ö ÀÖ´Ù.
C ÄÄÆÄÀÏ·¯´Â ÃæºÐÈ÷ ¿À·¨µ¿¾È Àß ¾²¿©Á®¿Ô´Ù.
</Para>

<Para>
¸î¸î ½Ã½ºÅÛ¿¡¼­, ´ç½ÅÀº »ý¼ºµÈ Äڵ带 ÃÖÀûÈ­ Çϱâ À§ÇØ ¸î°¡Áö ¿É¼ÇÀ» ¾µ ¼ö
ÀÖ´Ù.
</Para>

<Para>
¿À´Ã³¯, C´Â ÁÖ·Î ¿î¿µÃ¼Á¦³ª µð¹ÙÀ̽º µå¶óÀ̹ö, ºü¸£°Ô ÀÛµ¿ÇؾßÇÏ´Â ÇÁ·Î±×·¥À»
¾²±â À§ÇØ ·Î¿ì·¹º§ ½Ã½ºÅÛ ÇÁ·Î±×·¡¹Ö¿¡ ¾²ÀδÙ.
</Para>

<Para>
<Emphasis remap="bf">Note: <Emphasis remap="it"> ÀÌ HOWTO¿¡ Á¦°øµÇ´Â String,
StringBuffer, StringTokenizer class¸¦ ÀÌ¿ëÇÏ¿© C++ Äڵ带 Java¿Í ¿ÏÀüÈ÷ ¶È°°ÀÌ
¾µ ¼ö ÀÖ´Ù. ÀÌ ¹®¼­ÀÇ ÀϺδ C++·Î Java class¸¦ Èä³»³¿À¸·Î½á C++°ú JavaÀÇ Â÷À̸¦ ÁÙÀÌ°íÀÚ Çß´Ù.
C++°ú Java¸¦ ¿Ô´Ù°¬´ÙÇÏ´Â Java ÇÁ·Î±×·¡¸ÓµéÀº ÀÌ String class¸¦ ÁÁ¾ÆÇÒ °ÍÀÌ´Ù.
</Emphasis></Emphasis>
</Para>

<Para>
¸¸¾à C++ÀÇ ÀÛ¼º-ÄÄÆÄÀÏ-µð¹ö±ë-ÄÄÆÄÀÏ ½ÎÀÌŬÀÌ ½È´Ù¸é, web °³¹ßÀ̳ª ÀϹÝÀûÀÌ ÇÁ·Î±×·¡¹Ö¿¡ ¾²ÀÏ ¼ö ÀÖ´Â PHP°°Àº script ¾ð¾î¸¦ ¾Ë¾Æº¸¾Æ¶ó. PHP³ª PERL°°Àº script¾ð¾î´Â ºü¸¥ ¾îÇø®ÄÉÀÌ¼Ç °³¹ßÀ» °¡´ÉÇÏ°Ô ÇÑ´Ù. PHP´Â ¸î°¡Áö °´Ã¼ÁöÇâÀ» À§ÇÑ Æ¯Â¡µµ °®°í ÀÖ´Ù. PHP HOWTO´Â 
<ULink
URL="http://www.linuxdoc.org/HOWTO/PHP-HOWTO.html"
>http://www.linuxdoc.org/HOWTO/PHP-HOWTO.html</ULink> (<ULink URL="http://kldp.org/HOWTO/html/PHP/PHP-HOWTO.html"
>Çѱ۹ø¿ª</ULink>) ¿¡¼­ º¼ ¼ö ÀÖ´Ù.
</Para>

</Sect2>

<Sect2>
<Title>ÇöÀç C++ ÄÄÆÄÀÏ·¯ÀÇ ¹®Á¦Á¡</Title>

<Para>
C++Àº C¸¦ Æ÷ÇÔÇϱ⠶§¹®¿¡, CÀÇ *³ª»Û* Á¡µéÀ» ¸ðµÎ °®°í ÀÖ´Ù.
¸Þ¸ð¸®ÀÇ ¼öµ¿ ÇÒ´ç°ú ÇØÁ¦´Â Áö·çÇÏ°í, ¿¡·¯¸¦ ¸¸µé¾î³»±â ÀϾ¥ÀÌ´Ù. ( <XRef LinkEnd="garbage"> ¸¦ º¸¶ó).
</Para>

<Para>
C ÇÁ·Î±×·¡¹Ö¿¡¼­´Â ´ÙÀ½°ú °°Àº °Íµé·Î ÀÎÇØ ¸Þ¸ð¸® ¸¯À̳ª ¿À¹öÇ÷ο찡 ¸Å¿ì ÈçÇÏ´Ù.

<ProgramListing>
	Datatype  char * and char[]
	String functions like strcpy, strcat, strncpy, strncat, etc..
	Memory functions like malloc, realloc, strdup, etc..
</ProgramListing>

</Para>

<Para>
<Emphasis remap="bf">char *</emphasis>¿Í <emphasis remap="bf">strcpy</emphasis>ÀÇ »ç¿ëÀº 
<Emphasis remap="it">"¿À¹öÇ÷οì"</Emphasis>, 
<Emphasis remap="it">"°æ°èħ¹ü¿¡·¯(fence past errors)"</Emphasis>, <Emphasis remap="it">"¸Þ¸ð¸® ¿À¿°(memory corruption)"</Emphasis>,
<Emphasis remap="it">"´Ù¸¥º¯¼ö ħ¹ü(step-on-others-toe)"</Emphasis> À̳ª  <Emphasis remap="it">"¸Þ·Î¸® ¸¯(memory leaks)"</Emphasis> µîÀÇ ²ûÂïÇÑ ¸Þ¸ð¸® ¹®Á¦¸¦ ÀÏÀ¸Å²´Ù.
¸Þ¸ð¸® ¹®Á¦´Â ¸Å¿ì µð¹ö±ëÀÌ Èûµé°í, µû¶ó¼­ °íÄ¡±â´Âµ¥ ¸¹Àº ½Ã°£ÀÌ µç´Ù.
¸Þ¸ð¸® ¹®Á¦´Â ÇÁ·Î±×·¡¸ÓÀÇ »ý»ê¼ºÀ» ¶³¾î¶ß¸°´Ù. ÀÌ ¹®¼­´Â C++ÀÇ ÀÌ·¯ÇÑ ´ÜÁ¡À»
ÇØ°áÇϱâ À§ÇØ °í¾ÈµÈ ¿©·¯°¡Áö ¹æ¹ýµéÀ» ÅëÇØ ÇÁ·Î±×·¡¸ÓÀÇ »ý»ê¼ºÀ» ³ôÀ̴µ¥ µµ¿òÀ»
ÁÖ°íÀÚ ÇÑ´Ù.

¸Þ¸ð¸® °ü·Ã ¹ö±×´Â Àâ±â Èûµé°í, °æÇ踹Àº ÇÁ·Î±×·¡¸Óµéµµ ¸Þ¸ð¸® °ü·Ã ¹®Á¦¸¦ °íÄ¡´Â µ¥´Â
¸çÄ¥¿¡¼­ ¸îÁÖ°¡ °É¸°´Ù.
¸Þ¸ð¸® ¹ö±×´Â ¸î´Þµ¿¾È ÄÚµå ¼Ó¿¡ ¼û¾î¼­ °©ÀÛ½º·± ÇÁ·Î±×·¥ Á¤Áö¸¦ ÀÏÀ¸Å³ ¼ö ÀÖ´Ù.
<Emphasis remap="bf">char *</Emphasis> ¿Í C/C++¿¡¼­ÀÇ <Emphasis remap="bf"> Æ÷ÀÎÅÍ</Emphasis>
»ç¿ëÀ¸·Î ÀÎÇÑ ¸Þ¸ð¸® ¹ö±×´Â µð¹ö±ë°ú ÇÁ·Î±×·¥ Á¤Áö·Î ÀÎÇØ ¸Å³â 20¾ï ´Þ·¯¿¡ ÇØ´çÇÏ´Â
½Ã°£ÀÇ ¼Ò¸ð¸¦ ÀÏÀ¸Å²´Ù.
¸¸¾à C++¿¡¼­ 
<Emphasis remap="bf">char *</Emphasis> °ú <Emphasis remap="bf">Æ÷ÀÎÅÍ</Emphasis> 
¸¦ »ç¿ëÇÑ´Ù¸é, ÀÌ´Â ¸Å¿ì Èûµç ÀÏÀÌ µÉ °ÍÀÌ´Ù. ƯÈ÷ ÇÁ·Î±×·¥ÀÇ Å©±â°¡ 10,000 ÁÙ ÀÌ»óÀÏ ¶§.
</Para>

<Para>
µû¶ó¼­, ¾Æ·¡ÀÇ °ÍµéÀÌ C-style¿¡¼­ÀÇ ¹®Á¦Á¡À» ±Øº¹Çϱâ À§ÇØ Á¦¾ÈµÇ¾ú´Ù.
¾Õ¿¡ ³ª¿À´Â °ÍÀÌ ´õ ÁÁÀº °ÍÀÌ´Ù.

<OrderedList>
<ListItem>

<Para>
 Æ÷ÀÎÅÍ ´ë½Å ·¹ÆÛ·±½º¸¦ »ç¿ëÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 (ÀÌ HOWTO¿¡ ÁÖ¾îÁø) Java Çü½ÄÀÇ class¸¦ »ç¿ëÇϰųª, C++ Ç¥ÁضóÀ̺귯¸®ÀÇ string class¸¦ »ç¿ëÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 C++¿¡¼­ÀÇ ¹®ÀÚ Æ÷ÀÎÅÍ(char *) »ç¿ëÀº String class¸¦ »ç¿ëÇÏÁö ¸øÇÒ ¶§·Î ±× <Emphasis remap="bf">»ç¿ëÀ» Á¦ÇÑ</Emphasis>ÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 ¸¸¾à C++¿¡¼­ÀÇ ¹®ÀÚ Æ÷ÀÎÅÍ(char *)¸¦ »ç¿ëÇÏ°í ½ÍÁö ¾ÊÀ» ¶§´Â, extern ¿¬°è¸¦ ÀÌ¿ëÇÏ´Â (char *)¸¦.
</Para>
</ListItem>

</OrderedList>

</Para>

<Para>
"CÀÇ char *"¸¦ »ç¿ëÇϱâ À§Çؼ­´Â, C ÇÁ·Î±×·¥À» ´Ù¸¥ ÆÄÀÏ¿¡ ³Ö°í, 
<Emphasis remap="it">¿¬°è¸í½Ã</Emphasis> ¹® <Emphasis remap="bf">extern "C" </Emphasis>¸¦ ÀÌ¿ëÇÏ¿©
C++ ÇÁ·Î±×·¥¿¡ ¸µÅ©ÇÑ´Ù -

<ProgramListing>
extern "C" {
#include &#60;some_c_header.h&#62;
}

extern "C" {
    comp();
    some_c_function();
}
</ProgramListing>

</Para>

<Para>
<Emphasis remap="bf">extern "C"</Emphasis> ´Â ¿¬°è ¸í½ÃÀÌ°í, ¾ç Áß°ýÈ£·Î µÑ·¯½ÎÀÎ
ºí·Ï¾ÈÀÇ ¸ðµç ³»¿ëÀÌ C++ÀÌ ¾Æ´Ñ CÀÇ ¿¬°è ¹æ¹ýÀ» »ç¿ëÇÑ´Ù´Â ¸»ÀÌ´Ù.
</Para>

<Para>
<Emphasis remap="bf">'String Ŭ·¡½º'</Emphasis>´Â ¸Þ¸ð¸® ÇÒ´ç°ú ÇØÁ¦¸¦ À§ÇØ »ý¼ºÀÚ¿Í
Æı«ÀÚ¸¦ ÀÌ¿ëÇÏ°í,
<Emphasis remap="it">ltrim</Emphasis>, <Emphasis remap="it">substring</Emphasis> µîµî°ú °°Àº
ÇÔ¼ö¸¦ Á¦°øÇÑ´Ù.
</Para>

<Para>
¶ÇÇÑ °ü·ÃµÈ <XRef LinkEnd="standard-string"> ¸¦ »ç¿ëÇÏ´Â C++ ÄÄÆÄÀÏ·¯¿¡¼­ ã¾Æº¸¾Æ¶ó.
<Emphasis remap="bf">string Ŭ·¡½º</Emphasis>´Â Ç¥ÁØ C++ ¶óÀ̺귯¸®ÀÇ ÀϺÎÀÌ°í, ¿©·¯°¡Áö
¹®ÀÚ¿­ °ü·Ã ÇÔ¼ö¸¦ Á¦°øÇÑ´Ù.
</Para>

<Para>
C++ <Emphasis remap="bf">'string Ŭ·¡½º'</Emphasis> ¿Í <Emphasis remap="bf">'String Ŭ·¡½º'</Emphasis> 
¶óÀ̺귯¸®°¡ ¸¹Àº ¹®ÀÚ¿­ ÇÔ¼ö¸¦ Á¦°øÇϱ⠶§¹®¿¡, Á÷Á¢ ¹®ÀÚ¿­ ÇÔ¼ö¸¦ ¾²±â À§ÇØ
¹®ÀÚ Æ÷ÀÎÅ͸¦ »ç¿ëÇÒ Çʿ伺ÀÌ °ÅÀÇ ¾ø´Ù.
¶ÇÇÑ, C++ ÇÁ·Î±×·¡¸Ó´Â Ç×»ó 'malloc'À̳ª 'free'´ë½Å 'new', 'delete'¸¦ »ç¿ëÇØ¾ß ÇÑ´Ù.
</Para>

<Para>
µÎ ¹®ÀÚ¿­ Ŭ·¡½º´Â 
<Emphasis remap="bf">char *</Emphasis> ³ª <Emphasis remap="bf">char &lsqb;]</Emphasis>°¡ ÇÒ ¼ö ÀÖ´Â ¸ðµç ÀÏÀ»
ÇÒ ¼ö ÀÖ´Ù.
±×¸®°í º¸ÅÂÁø ÁÁÀº Á¡Àº ¸Þ¸ð¸® ¹®Á¦³ª ¸Þ¸ð¸® ÇÒ´ç¿¡ ´ëÇØ ÀüÇô °ÆÁ¤ÇÒ ÇÊ¿ä°¡ ¾ø´Ù´Â °ÍÀÌ´Ù.
</Para>

</Sect2>

</Sect1>

<Sect1 id="cplusplus-compilers">
<Title>ÃßõÇÒ¸¸ÇÑ C++ ÄÄÆÄÀÏ·¯ </Title>

<Para>
ISO¿Í ANSI¿¡ ÀÇÇØ Ã¤ÅÃµÈ ÇöÀçÀÇ C++ Ç¥ÁØÀº 1997³â¿¡ óÀ½ ¿Ï¼ºµÇ¾ú´Ù.
¾ÆÁ÷ ¸ðµç ÄÄÆÄÀÏ·¯°¡ À̸¦ µû¸£°í ÀÖÁö ¾Ê°í, ¸ðµç Ư¡µéÀÌ ´Ù Áö¿øµÇÁö´Â
¾Ê´Â ´Ù´Â °ÍÀÌ´Ù. - Ç¥ÁØ¿¡ ¸Â´Â ÄÄÆÄÀÏ·¯¸¦ ¾²´Â °ÍÀº ¸Å¿ì Áß¿äÇÏ´Ù.
</Para>

<Sect2>
<Title>MS Windows 2000/NT/95/98/ME/XP¸¦ À§ÇÑ ÄÄÆÄÀÏ·¯</Title>

<Para>
MS Windows´Â C++°³¹ß·Î ²Ï À¯¸íÇϱ⠶§¹®¿¡, ÀÌ ¹®¼­¿¡ ÁÖ¾îÁø String class
¶óÀ̺귯°¡ Àß ÀÛµ¿ÇÏ°í, Windows XP/2000/NT/95/98/ME µî ¸ðµç ¹öÀü¿¡¼­ Àß
ÀÛµ¿ÇÑ´Ù.
MS Windows¸¦ À§ÇÑ C++ ÄÄÆÄÀÏ·¯ :

<ItemizedList>
<ListItem>

<Para>
 GNU BloodShed <ULink
URL="http://www.bloodshed.net/devcpp.html"
>http://www.bloodshed.net/devcpp.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Borland C++ compiler <ULink
URL="http://www.borland.com/bcppbuilder/freecompiler"
>http://www.borland.com/bcppbuilder/freecompiler</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Microsoft Visual C++ compiler <ULink
URL="http://msdn.microsoft.com/visualc"
>http://msdn.microsoft.com/visualc</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 MSDOS C++ compiler <ULink
URL="http://www.delorie.com/djgpp"
>http://www.delorie.com/djgpp</ULink
>
</Para>
</ListItem>

</ItemizedList>
ÀÌ ¹®¼­ÀÇ String Ŭ·¡½º´Â À§¿¡ ¾ð±ÞµÈ ¸ðµç ÄÄÆÄÀÏ·¯·Î Å×½ºÆ® µÇ¾ú°í,
MS Visual C++ v6.0, Borland C++ v5.2, Borland C++ v5.5.1, Bloodshed ÄÄÆÄÀÏ·¯¿¡¼­
Àß µ¿ÀÛÇÑ´Ù.
</Para>

</Sect2>

<Sect2>
<Title>UNIX¿Í ±âŸ UNIX-like ½Ã½ºÅÛµéÀÇ ÄÄÆÄÀÏ·¯</Title>

<Para>
GNU ¼¼°è¿¡¼­´Â GCC(GNU Compiler Collection)¸¦ »ç¿ëÇÏ´Â °ÍÀÌ °¡Àå ÁÁÀº ¼±ÅÃÀÌ´Ù.
GCC´Â ´ëºÎºÐÀÇ ¸®´ª½º ¹èÆ÷ÆÇ, FreeBSD, ±âŸ Unix Ŭ·Ðµé¿¡ µé¾îÀÖ´Ù.
GCC ȨÆäÀÌÁö´Â <ULink
URL="http://gcc.gnu.org"
>http://gcc.gnu.org</ULink
>ÀÌ´Ù. 
ÃֽŹöÀüÀÇ GCC(3.0)Àº °¡Àå Ç¥ÁØÀ» Àß ÁؼöÇÑ ÄÄÆÄÀÏ·¯ Áß ÇϳªÀÌ´Ù.
</Para>

</Sect2>

</Sect1>

<Sect1 id="String-Variety">
<Title>¿©·¯°¡Áö ¹®ÀÚ¿­°ü·Ã class</Title>

<Para>
¹®ÀÚ¿­ class´Â ÇÁ·Î±×·¡¹Ö¿¡¼­ °¡Àå Áß¿äÇÑ °Íµé Áß ÇϳªÀÌ°í, ¹®ÀÚ¿­ Á¶Á¤À»
À§ÇØ ¸Å¿ì ¸¹ÀÌ ¾²ÀδÙ.
¹®ÀÚ¿­ class´Â ¿©·¯°¡Áö°¡ ÀÖ°í, ¹°·Ð À̵éÀ» »ó¼Ó¹ÞÀ½À¸·Î½á ÀڽŸ¸ÀÇ
¹®ÀÚ¿­ class¸¦ ¸¸µé ¼öµµ ÀÖ´Ù.

<ItemizedList>
<ListItem>
<Para>
 ÀÌ ¹®¼­¿¡ ¾²¿©Áø ¹®ÀÚ¿­ Ŭ·¡½º´Â 
<XRef LinkEnd="Appendix-A">¸¦ º¸¾Æ¶ó.
</Para>
</ListItem>
<ListItem>
<Para>
 Ç¥ÁØ C++ ¶óÀ̺귯¸® string class (ANSI/ISO string class <ULink
URL="http://www.msoe.edu/eecs/cese/resources/stl/string.htm"
>http://www.msoe.edu/eecs/cese/resources/stl/string.htm</ULink
> ¿Í <ULink
URL="http://www.sgi.com/tech/stl/basic_string.html"
>http://www.sgi.com/tech/stl/basic_string.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 QtÀÇ ¿ÜºÎ ¶óÀ̺귯¸®¿¡ ÀÖ´Â Qt String class <ULink
URL="http://doc.trolltech.com/qstring.html"
>http://doc.trolltech.com/qstring.html</ULink
> , mirror : <ULink
URL="http://www.cs.berkeley.edu/~dmartin/qt/qstring.html"
>http://www.cs.berkeley.edu/~dmartin/qt/qstring.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 À̵é Áß ¸¾¿¡ µå´Â °ÍÀÌ ¾ø´Ù¸é, ÀڽŸ¸ÀÇ ¹®ÀÚ¿­ Ŭ·¡½º¸¦ ¸¸µé ¼öµµ ÀÖ´Ù.
 À§¿¡ ¾ð±ÞµÈ Çϳª ȤÀº ¿©·¯ class¸¦ »ó¼Ó¹Þ¾Æ ¸¸µé ¼öµµ ÀÖ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Sect2>
<Title>Multiple Inheritance - ÀڽŸ¸ÀÇ ¹®ÀÚ¿­ class ¸¸µé±â</Title>

<Para>
À§¿¡ ¸»ÇÑ °Í °°ÀÌ, Çϳª ȤÀº ¿©·¯ class¸¦ »ó¼Ó¹Þ¾Æ ÀڽŸ¸ÀÇ ¹®ÀÚ¿­ class¸¦
¸¸µé ¼öµµ ÀÖ´Ù. ¿©±â¼­´Â Ç¥ÁØ C++ ¶óÀ̺귯¸®ÀÇ string class¿Í ºÎ·Ï AÀÇ
String class ¸¦ »ó¼Ó¹ÞÀ½À¸·Î½á ´ÙÁß»ó¼ÓÀ» ÀÌ¿ëÇÑ ¹®ÀÚ¿­ class¸¦ ¸¸µé¾î º¼
°ÍÀÌ´Ù.
</Para>

<Para>
¿ì¼± ¿¹Á¦ ÆÄÀÏ 'string&lowbar;multi.h'¸¦ <XRef LinkEnd="Appendix-A"> ¿¡¼­ ´Ù¿î·Îµå ¹Þ¾Æ¶ó.
</Para>

<Para>
ÀÌ ÆÄÀÏÀº ´ÙÀ½°ú °°´Ù :
</Para>

<Para>

<ProgramListing>
// ******************************************************************
// String class¿Í Ç¥ÁØ ¶óÀ̺귯¸®ÀÇ "string" class¸¦ »ó¼Ó¹ÞÀ½À¸·Î½á
// Á÷Á¢ ¹®ÀÚ¿­ class¸¦ ¸¸µé¾îº¸´Â ¿¹½Ã¸¦ À§ÇÑ ÇÁ·Î±×·¥
// ******************************************************************

#ifndef __STRING_MULTI_H_ALDEV_
#define __STRING_MULTI_H_ALDEV_

#include &#60;string&#62;
#include "String.h"
#include "StringBuffer.h"

#ifdef NOT_MSWINDOWS
#else
using namespace std;  // MS Visual C++ compiler Version 6.0 ¿¡¼­ ÇÊ¿äÇÔ.
#endif

// Áß¿ä! : C++¿¡¼­´Â »ý¼ºÀÚ, Æı«ÀÚ, º¹»ç ¿¬»êÀÚ°¡ °°ÀÌ »ó¼ÓµÇÁö ¾Ê´Â´Ù.
//	µû¶ó¼­ ¸¸¾à =, + µîÀÇ ¿¬»êÀÚ°¡ base class¿¡ Á¤ÀǵǾî ÀÖ°í, base
//	classÀÇ »ý¼ºÀÚ¸¦ ÀÌ¿ëÇÑ´Ù¸é, ¹Ýµå½Ã °°Àº ¿ªÇÒÀ» ÇÏ´Â »ý¼ºÀÚ¸¦
//	»ó¼Ó¹Þ´Â class¿¡µµ ¸¸µé¾îÁÖ¾î¾ß ÇÑ´Ù.
//	¾Æ·¡¿¡ ÁÖ¾îÁø mystring(), mystring(char [])¸¦ º¸¾Æ¶ó.
//
//	¶ÇÇÑ atmpstrÀÌ mystringÀ¸·Î ¼±¾ðµÇ¾ú´Ù°í ÇÒ ¶§, atmpstr + mstr 
//	°ú °°ÀÌ ¿¬»êÀÚ¸¦ ¾µ ¶§, ½ÇÁ¦·Î ºÒ¸®´Â °ÍÀº atmpstr.operator+(mstr)ÀÌ´Ù. 

class mystring:public String, string
{
	public:
		mystring():String() {}  // =, + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿äÇÏ´Ù
		mystring(char bb[]):String(bb) {}  // =, + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿äÇÏ´Ù

		mystring(char bb[], int start, int slength):String(bb, start, slength) {}
		mystring(int bb):String(bb) {}  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿äÇÏ´Ù
		mystring(unsigned long bb):String(bb) {}  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿äÇÏ´Ù
		mystring(long bb):String(bb) {}  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿äÇÏ´Ù
		mystring(float bb):String(bb) {}  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿äÇÏ´Ù
		mystring(double bb):String(bb) {}  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿äÇÏ´Ù
		mystring(const String &#38; rhs):String(rhs) {}  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿äÇÑ Copy Constructor
		mystring(StringBuffer sb):String(sb) {}  // Java¿ÍÀÇ È£È¯À» À§ÇØ
		mystring(int bb, bool dummy):String(bb, dummy) {}  // StringBuffer class¸¦ À§ÇØ

		int mystraa; // mystringÀÇ ÃÖÀûÈ­
	private:
		int mystrbb; // mystringÀÇ ÃÖÀûÈ­
};

#endif // __STRING_MULTI_H_ALDEV_
</ProgramListing>

</Para>

</Sect2>

</Sect1>

<Sect1 id="Download-String">
<Title>String class ´Ù¿î¹Þ±â</Title>

<Para>
¸ðµç ÇÁ·Î±×·¥°ú ¿¹Á¦´Â ÀÌ ¹®¼­ÀÇ ºÎ·Ï¿¡ ÁÖ¾îÁø´Ù.
String class¿Í ¶óÀ̺귯¸®, ¿¹Á¦ ÇÁ·Î±×·¥À» ÇϳªÀÇ tar zip ¾ÐÃàÆÄÀÏ·Î
¹­¾î³õÀº ¸µÅ©°¡ ´ÙÀ½°ú °°´Ù.

<ItemizedList>
<ListItem>

<Para>
 
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>http://www.milkywaygalaxy.freeservers.com</ULink
> ·Î °¡¼­ 
"Source code C++ 
Programming howto" (<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>Milkyway Galaxy site</ULink
>) ¸¦ ´­·¯¶ó.

</Para>
</ListItem>
<ListItem>

<Para>
 ¹Ì·¯ »çÀÌÆ®´Â ´ÙÀ½°ú °°´Ù -
<ULink
URL="http://www.angelfire.com/country/aldev0"
>angelfire</ULink
>,
<ULink
URL="http://www.geocities.com/alavoor/index.html"
>geocities</ULink
>,
<ULink
URL="http://aldev0.virtualave.net"
>virtualave</ULink
>,
<ULink
URL="http://aldev0.50megs.com"
>50megs</ULink
>,
<ULink
URL="http://members.theglobe.com/aldev1/index.html"
>theglobe</ULink
>,
<ULink
URL="http://members.nbci.com/alavoor"
>NBCi</ULink
>,
<ULink
URL="http://aldev.terrashare.com"
>Terrashare</ULink
>,
<ULink
URL="http://members.fortunecity.com/aldev"
>Fortunecity</ULink
>,
<ULink
URL="http://aldev.freewebsites.com"
>Freewebsites</ULink
>,
<ULink
URL="http://members.tripod.lycos.com/aldev"
>Tripod</ULink
>,
<ULink
URL="http://members.spree.com/technology/aldev"
>Spree</ULink
>,
<ULink
URL="http://www.escalix.com/freepage/aldev"
>Escalix</ULink
>,
<ULink
URL="http://www.httpcity.com/aldev/index.html"
>Httpcity</ULink
>,
<ULink
URL="http://aldev.freeservers.com"
>Freeservers</ULink
>.

</Para>
</ListItem>

</ItemizedList>

</Para>

<Sect2 id="trust">
<Title>¾î¶»°Ô ÀúÀÚÀÇ String class¸¦ ¹ÏÀ» ¼ö ÀÖ³ª?</Title>

<Para>
Ȥ String class¸¦ ¹ÏÀ» ¼ö ¾øÀ» ¼öµµ ÀÖ´Ù.
À̸¦ ÇØ°áÇϱâ À§ÇØ, ÀúÀÚÀÇ String class¸¦ °ËÁõÇÒ °úÇÐÀûÀÎ ¹æ¹ýÀÌ ÀÖ´Ù.
Çö´ë ÄÄÇ»ÅÍ °øÇÐÀÚµéÀº ¼ÒÇÁÆ®¿þ¾î¸¦ °ËÁõÇϱâ À§ÇØ ¸Ó¸®°¡ ¾Æ´Ñ CPU¸¦ ¾´´Ù.
»ç¶÷ÀÇ ¸Ó¸®´Â ³Ê¹« ´À¸®±â ¶§¹®¿¡ Å×½ºÆ®¿Í °ËÁõÀ» À§Çؼ­´Â ÄÄÇ»ÅÍÀÇ ÈûÀ»
ºô¸®´Â °ÍÀÌ ÁÁ´Ù.
</Para>

<Para>
ÇÁ·Î±×·¥ 
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>example_String.cpp</ULink
>
À¸·Î °¡¼­ 'Source code for C++' ¸¦ ¼±ÅÃÇضó.
( ºÎ·Ï A ¿¡µµ ÁÖ¾îÁø´Ù. 
<XRef LinkEnd="Appendix-A"> 
) À§ ÇÁ·Î±×·¥Àº ¼ö¹é¸¸¹øÀÇ Å×½ºÆ®¸¦ ÀÚµ¿À¸·Î ÇÒ ¼ö ÀÖ´Â Å×½ºÆ® ¸ðµâÀ»
°®°í ÀÖ´Ù. String class¿¡ ÀÌ Å×½ºÆ®¸¦ Çغ»´Ù¸é, String class°¡

<Emphasis remap="bf">°ß°íÇÏ°í</Emphasis> 
<Emphasis remap="bf">¿Ïº®ÇÑ</Emphasis> ÇÁ·Î±×·¥ÀÓÀ» ¾Ë ¼ö ÀÖÀ» °ÍÀÌ´Ù.
</Para>

<Para>
Á÷Á¢ <emphasis remap="bf">50000</emphasis>¹Ýº¹À¸·Î Å×½ºÆ® Çغ¸¾Ò´õ´Ï
¿À·ù¾øÀÌ Àß µ¿ÀÛÇÏ¿´´Ù.
¶ÇÇÑ, ¾î¶°ÇÑ ¸Þ¸ð¸® ¸¯µµ ¹ß°ßÇÒ ¼ö ¾ø¾ú´Ù. 
Å×½ºÆ®´Â ¸®´ª½º¿¡¼­ /usr/bin/gtop, UNIX top ¸í·É¾î, 
KDEStart-&#62;System-&#62;KDE System Guard
and KDEStart-&#62;System-&#62;Process management µîÀ» »ç¿ëÇÏ¿© cpu¿Í ¸Þ¸ð¸®¸¦
üũÇϸç ÀÌ·ç¾îÁ³´Ù.
</Para>

<Para>
³ª´Â <Emphasis remap="bf">¹Ýº¹È½¼ö </Emphasis> ¸¦ õ¸¸¹øÀ̳ª ±× ÀÌ»óÀ¸·Î ³õ°í Å×½ºÆ®
Çغ¸±â¸¦ ÃßõÇÑ´Ù. ¹Ýº¹È½¼ö°¡ Ŭ¼ö·Ï ½Å·Ú¼ºÀº ´õ¿í ³ô¾ÆÁú °ÍÀÌ´Ù!!
Å×½ºÆ®¸¦ µ¹·Á³õ°í ¹äÀ» ¸ÔÀ¸·¯ ´Ù³à¿À¸é °á°ú¸¦ º¼ ¼ö ÀÖÀ» °ÍÀÌ´Ù!!
</Para>

</Sect2>

</Sect1>

<Sect1>
<Title>String class »ç¿ëÇϱâ</Title>

<Para>
ÀÌ String class´Â Ç¥ÁØ C++ ¶óÀ̺귯¸®ÀÇ string class¿Í ´Ù¸£´Ù´Âµ¥ ÁÖÀÇÇ϶ó.
ÀÌ Æ¯º°ÇÑ String class´Â Á÷Á¢ ¸¸µé¾îÁø °ÍÀÌ°í, Java ÇÁ·Î±×·¡¸ÓµéÀÌ C++À»
½±°Ô »ç¿ëÇϵµ·Ï Çϱâ À§ÇØ ¸¸µé¾îÁ³´Ù. ¸¸¾à ´ç½ÅÀÌ C++°ú ´õ Àͼ÷ÇÏ´Ù¸é
Ç¥ÁØ C++ ¶óÀ̺귯¸®¿¡ Á¦°øµÇ´Â ÁøÂ¥ string class ¸¦ »ç¿ë ÇÏ´Â °ÍÀÌ ÁÁ´Ù.
</Para>

<Para>
String class¸¦ »ç¿ëÇϱâ À§ÇØ, <XRef LinkEnd="Appendix-A">ÀÇ 
"example&lowbar;String.cpp" ¿¹Á¦ ÇÁ·Î±×·¥°ú <XRef LinkEnd="Appendix-A">ÀÇ 
String class¸¦ º¸¾Æ¶ó.
</Para>

<Para>
<Emphasis remap="bf">'String class'</Emphasis> ´Â char¿Í char * ŸÀÔÀ» ¿Ïº®ÇÏ°Ô ´ë½ÅÇÒ 
¼ö ÀÖ´Ù.
<Emphasis remap="bf">'String class'</Emphasis>¸¦ char ó·³ »ç¿ëÇÒ ¼öµµ ÀÖ°í,
¿©·¯°¡Áö ´Ù¾çÇÑ ±â´Éµµ »ç¿ëÇÒ ¼ö ÀÖ´Ù. 
<XRef LinkEnd="Appendix-A"> ¿¡ ÁÖ¾îÁø makefile¿¡¼­ ¸¸µé¾îÁö´Â 'libString.a'¸¦
¸µÅ©ÇؾßÇÏ°í, C++ ¶óÀ̺귯¸®°¡ À§Ä¡ÇÑ ¸ðµç °÷ÀÇ ¶óÀ̺귯¸®¸¦ /usr/lib ³ª /lib 
µð·ºÅ丮¿¡ ¶óÀ̺귯¸®¸¦ º¹»çÇس־î¾ß ÇÑ´Ù.
'libString.a'¸¦ »ç¿ëÇϱâ À§Çؼ­´Â, ´ÙÀ½°ú °°ÀÌ ÄÄÆÄÀÏÇ϶ó.
<ProgramListing>
	g++ example.cpp -lString
</ProgramListing>
´ÙÀ½¿¡ ÁÖ¾îÁø ¿¹Á¦ Äڵ带 º¸¶ó.
<ProgramListing>
	String aa;

	aa = "Creating an Universe is very easy, similar to creating a baby human.";

	// ÇÁ·Î±×·¥¿¡¼­ aa.val()À» 'char *' °°ÀÌ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
	for (unsigned long tmpii = 0; tmpii &#60; aa.length(); tmpii++)
	{
		//fprintf(stdout, "aa.val()[%ld]=%c ", tmpii, aa.val()[tmpii]);
		fprintf(stdout, "aa[%ld]=%c ", tmpii, aa[tmpii]);
	}

	// ½ÇÁ¦·Î 'char *'·Î »ç¿ëÇϸé..
	for (char *tmpcc = aa.val(); *tmpcc != 0; tmpcc++)  
	{
		fprintf(stdout, "aa.val()=%c ", *tmpcc);
	}
</ProgramListing>

</Para>

<Sect2>
<Title>¿¬»êÀÚ</Title>

<Para>
<Emphasis remap="bf">'String class'</Emphasis> 
´Â ¾Æ·¡¿Í °°Àº ¿¬»êÀÚ¸¦ Á¦°øÇÑ´Ù :-

<ItemizedList>
<ListItem>

<Para>
 Equal to <Emphasis remap="bf">==</Emphasis> 
</Para>
</ListItem>
<ListItem>

<Para>
 Not equal to <Emphasis remap="bf">!=</Emphasis> 
</Para>
</ListItem>
<ListItem>

<Para>
 Assignment <Emphasis remap="bf">=</Emphasis>  
</Para>
</ListItem>
<ListItem>

<Para>
 Add to itself and Assignment <Emphasis remap="bf">+=</Emphasis> 
</Para>
</ListItem>
<ListItem>

<Para>
 String concatenation or addition <Emphasis remap="bf">+</Emphasis>  
</Para>
</ListItem>

</ItemizedList>

¿¬»êÀÚ¸¦ »ç¿ëÇÏ´Â ¿¹Á¦¸¦ º¸ÀÚ.

<ProgramListing>
	String aa;
	String bb("Bill Clinton");

	aa = "put some value string";  // assignment operator
	aa += "add some more"; // Add to itself and assign operator
	aa = "My name is" + " Alavoor Vasudevan "; // string cat operator

	if (bb == "Bill Clinton")  // boolean equal to operator
		cout &#60;&#60; "bb is equal to 'Bill Clinton' " &#60;&#60; endl;

	if (bb != "Al Gore")   // boolean 'not equal' to operator
		cout &#60;&#60; "bb is not equal to 'Al Gore'" &#60;&#60; endl;
</ProgramListing>

</Para>

</Sect2>

<Sect2>
<Title>ÇÔ¼ö</Title>

<Para>
String class¿¡¼­ Á¦°øµÇ´Â ÇÔ¼öµéÀº Java ÀÇ String class¿Í 
<Emphasis remap="bf">°°Àº À̸§</Emphasis>À» °®´Â´Ù.
ÇÔ¼ö À̸§°ú µ¿ÀÛÀº JavaÀÇ String class¿Í <Emphasis remap="bf">¿ÏÀüÈ÷</Emphasis>¶È°°´Ù.
StringBuffer class¿ª½Ã Á¦°øµÈ´Ù.
À̵éÀº Java¿Í C++°£ÀÇ Æ÷ÆÃÀ» ½±°Ô ÇÒ °ÍÀÌ´Ù (À߶󳻱â & ºÙ¿©³Ö±â¿Í ÃÖ¼ÒÇÑÀÇ ÄÚµå Á¶Á¤
¸¸À» ÇÊ¿ä·Î ÇÒ °ÍÀÌ´Ù).
JavaÀÇ ÇÔ¼ö¿¡ µé¾îÀÖ´Â Äڵ带 C++ÀÇ ¸â¹öÇÔ¼ö·Î º¹»çÇϱ⸸ ÇÏ¸é µÉ °ÍÀÌ°í,
ÃÖ¼ÒÇÑÀÇ º¯°æ¸¸À¸·Îµµ C++¿¡¼­ Àß ÄÄÆÄÀÏ µÉ °ÍÀÌ´Ù.
¶Ç´Ù¸¥ ÀÌÁ¡Àº Java¿Í C++À» ¸ðµÎ »ç¿ëÇÏ´Â °³¹ßÀÚµéÀÌ µÑ °£ÀÇ ¹®¹ýÀ̳ª ÇÔ¼ö À̸§À»
µû·Îµû·Î ±â¾ïÇÒ ÇÊ¿ä°¡ ¾ø¾îÁø´Ù´Â °ÍÀÌ´Ù.
</Para>

<Para>
¿¹¸¦µé¾î integer¸¦ ¹®ÀÚ¿­·Î ¹Ù²Ù´Â °ÍÀ» º¸¸é, 

<ProgramListing>
	String	aa;

	aa = 34;  // '=' ¿¬»êÀÚ°¡ int¸¦ stringÀ¸·Î ¹Ù²Û´Ù.
	cout &#60;&#60; "The value of aa is : " &#60;&#60; aa.val() &#60;&#60; endl;

	aa = 234.878;  //  '=' ¿¬»êÀÚ°¡ float¸¦ stringÀ¸·Î ¹Ù²Û´Ù.
	cout &#60;&#60; "The value of aa is : " &#60;&#60; aa.val() &#60;&#60; endl;

	aa = 34 + 234.878;
	cout &#60;&#60; "The value of aa is : " &#60;&#60; aa.val() &#60;&#60; endl;
	// Ãâ·ÂÀº '268.878'ÀÏ °ÍÀÌ´Ù.

	// castingÀÌ ÇÊ¿äÇÏ´Ù.
	aa = (String) 34 + " Can create infinite number of universes!! " + 234.878;
	cout &#60;&#60; "The value of aa is : " &#60;&#60; aa.val() &#60;&#60; endl;
	// Ãâ·ÂÀº '34 Can create infinite number of universes!! 234.878'ÀÏ °ÍÀÌ´Ù.
</ProgramListing>

</Para>

<Para>
String classÀÇ ÇÔ¼öÀ̸§¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀº 
<XRef LinkEnd="Appendix-A"> ¸¦ Âü°íÇضó. °°Àº String.hÆÄÀÏÀÌ ´ÙÀ½ ¼½¼Ç¿¡µµ
³ª¿Ã °ÍÀÌ´Ù.
</Para>

</Sect2>

<Sect2>
<Title>String classÀÇ À̸§ ¹Ù²Ù±â</Title>

<Sect3>
<Title>Case 1: ´Ü¼øÇÑ À̸§ ¹Ù²Ù±â</Title>

<Para>
¸¸¾à String classÀÇ À̸§ÀÌ ¸¾¿¡ µéÁö ¾Ê´Â´Ù¸é, <Emphasis remap="bf">"typedef"</Emphasis>
¸¦ À̸§À» ¹Ù²Ù±â À§ÇØ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
</Para>

<Para>
String.h¸¦ includeÇÏ´Â ¸ðµç ÆÄÀÏ¿¡ ´ÙÀ½ÀÇ ³»¿ëÀ» ³Ö¾î¶ó :

<ProgramListing>
// StringÀ̶ó´Â À̸§ÀÌ ¸¾¿¡ µéÁö ¾Ê´Â´Ù¸é, ´ÙÀ½°ú °°ÀÌ ¹Ù²Ù¾î¶ó.
typedef String StringSomethingElseIwant;

// ÀÌÁ¦ ÄÚµå´Â ´ÙÀ½°ú °°ÀÌ µÉ °ÍÀÌ´Ù.
int main()
{
	StringSomethingElseIwant aa_renstr; 
	aa_renstr = "I renamed the String Class using typedef";

	// .....
}
</ProgramListing>

<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>example_String.cpp</ULink
>
¿¡ °¡¼­ 'Source code for C++'À» ¼±ÅÃÇضó.
</Para>

</Sect3>

<Sect3>
<Title>Case 2: À̸§ÀÌ °ãÄ¥ ¶§</Title>

<Para>
´Ù¸¥ °°Àº À̸§À» °¡Áø class¿Í À̸§ÀÌ °ãÄ¡´Âµ¥, µÎ class¸¦ ¸ðµÎ »ç¿ëÇÏ°í
½Í´Ù¸é, ´ÙÀ½°ú °°Àº ¹æ¹ýÀ» ½á¶ó.
String.h¸¦ includeÇÏ´Â ¸ðµç ÆÄÀÏ¿¡ ´ÙÀ½ÀÇ ³»¿ëÀ» ³Ö¾î¶ó.

<ProgramListing>
#define  String  String_somethingelse_which_I_want
#include "String.h"
#undef String

#include "ConflictingString.h"  // À̰͵µ StringÀ̶õ classÀÌ´Ù.

// ÄÚµå ³»¿ë..
int main()
{
	String_somethingelse_which_I_want aa;
	String bb; // ÀÌ°ÍÀº °ãÄ¡´Â String classÀÌ´Ù.

	aa = " some sample string";
	bb = " another string abraka-dabraka";
	.......
}
</ProgramListing>

Àü󸮱Ⱑ ¸ðµç StringÀ» "String&lowbar;somethingelse&lowbar;which&lowbar;I&lowbar;want" 
À¸·Î ¹Ù²Ü °ÍÀÌ°í, StringÀÇ Á¤ÀǸ¦ ¾ø¾Ù °ÍÀÌ´Ù.
undef ´ÙÀ½ ºÎÅÍ´Â "String" class¸¦ Á¤ÀÇÇÏ´Â °ãÄ¡´Â string class header°¡ ¿À°Ô µÈ´Ù.
</Para>

</Sect3>

</Sect2>

</Sect1>

<Sect1>
<Title>String.h ÆÄÀÏ</Title>

<Para>
C++°ú Java´Â ¸¹Àº ¼ÒÇÁÆ®¿þ¾î ÇÁ·ÎÁ§Æ®¿¡¼­ °°ÀÌ ¾²ÀδÙ.
C++°ú Java¸¦ ¿Ô´Ù°¬´ÙÇÏ´Â ÇÁ·Î±×·¡¸Óµé¿¡°Ô´Â ÀÌ ¹®ÀÚ¿­ class°¡ ¸Å¿ì À¯¿ëÇÒ °ÍÀÌ´Ù.
</Para>

<Para>
C++ (ȤÀº ´Ù¸¥ °´Ã¼ÁöÇâ ¾ð¾î)¿¡¼­´Â, "class µ¥ÀÌÅͱ¸Á¶"(ȤÀº ÀÎÅÍÆäÀ̽º)
¸¸ ÀÐÀ¸¸é ±× class¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù. ÀÎÅÍÆäÀ̽º¸¸ ÀÌÇØÇÏ¸é µÇÁö, ÀÎÅÍÆäÀ̽ºÀÇ
±¸Çö±îÁö´Â ¾Ë ÇÊ¿ä°¡ ¾ø´Â °ÍÀÌ´Ù.
String classÀÇ °æ¿ì, String.h ÆÄÀÏ¿¡ ÀÖ´Â String class¸¸ Àаí ÀÌÇØÇÏ¸é µÈ´Ù.
String class¸¦ ¾²±â À§ÇØ ±¸Çö(String.cpp)À» ¸ðµÎ 
<Emphasis remap="bf">ÀÐÀ» ÇÊ¿ä´Â ¾ø´Â</emphasis> °ÍÀÌ´Ù.
°´Ã¼ÁöÇâ classµéÀº ½Ã°£À» Àý¾àÇÏ°Ô ÇØÁÖ°í, ±¸ÇöÀÇ ³»¿ëÀ» 
<Emphasis remap="bf">±³¹¦ÇÏ°Ô ¼û°ÜÁØ´Ù</emphasis>.
</Para>

<Para>
( °´Ã¼ÁöÇâÀÎ Java¿¡µµ ÀÌ¿Í °°Àº ¿ªÇÒÀ» ÇÏ¿© ±¸Çö ³»¿ëÀ» ¼û°ÜÁÖ´Â 
<Emphasis remap="bf">'interface'</Emphasis> ¶õ °ÍÀÌ ÀÖ´Ù. )
</Para>

<Para>
¾Æ·¡ÀÇ ³»¿ëÀº <Emphasis remap="bf">String.h</Emphasis> ÆÄÀÏÀÌ°í,
<XRef LinkEnd="Appendix-A">À» Âü°íÇضó.

<ProgramListing>
//
// Author : Al Dev  Email: alavoor[AT]yahoo.com
// string class³ª String class¸¦ ½á¶ó.
//
// ¸Þ¸ð¸® ¸¯À» ¸·±â À§ÇØ - ¹®ÀÚ º¯¼ö¸¦ °ü¸®Çϱâ À§ÇÑ ¹®ÀÚ class
// char[]³ª char *º¸´Ù´Â String class³ª string class¸¦ ½á¶ó.
//

#ifndef __STRING_H_ALDEV_
#define __STRING_H_ALDEV_

// ÇÁ·Î±×·¥ÀÌ Ä¿Áú ¼ö·Ï iostreamÀ» »ç¿ëÇÏÁö ¸»¾Æ¶ó.
#ifdef NOT_MSWINDOWS
#include &#60;iostream&#62;
#else
#include &#60;iostream.h&#62; // ÇÏÀ§È£È¯¼ºÀ» À§ÇØ. C++ Ç¥ÁØÀº .h°¡ ¾ø´Ù.
#endif // NOT_MSWINDOWS

#include &#60;stdio.h&#62;   // File°ú sprintf()¸¦ À§ÇØ
//#include &#60;list.h&#62; // list

// MS Windows 95 VC++°ú Borland C++ ÄÄÆÄÀÏ·¯ÀÎ °æ¿ì - 
// d:\program files\CBuilder\include\examples\stdlib\list.cpp ¿Í include\list.h
// À» º¸¶ó.
//#include &#60;list&#62; // for list
//using namespace std;

const short INITIAL_SIZE = 	50;
const short NUMBER_LENGTH = 300;
const int MAX_ISTREAM_SIZE = 2048;

//class StringBuffer;

// ³ª´Â ÀÌ ¹®ÀÚ¿­ class¸¦ Linux (Redhat 7.1)¿Í MS Windows Borland C++ v5.2 (win32) 
// ¿¡¼­ ÄÄÆÄÀÏ / Å×½ºÆ® Çغ¸¾Ò´Ù.
// ¶ÇÇÑ, MS Visual C++ compiler¿¡¼­µµ ÀÛµ¿ÇÒ °ÍÀÌ´Ù.
class String
{
	public:
		String();
		String(const char bb[]);  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿ä
		String(const char bb[], int start, int slength); // ¹®ÀÚµéÀÇ ºÎºÐÁýÇÕ
		String(int bb);  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿ä
		String(unsigned long bb);  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿ä
		String(long bb);  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿ä
		String(float bb);  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿ä
		String(double bb);  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿ä
		String(const String &#38; rhs);  // + ¿¬»êÀÚ¸¦ À§ÇØ ÇÊ¿äÇÑ copy constructor
		//String(StringBuffer sb);  // Java¿ÍÀÇ È£È¯¼ºÀ» À§ÇØ 
					    // - ±×·¯³ª MS windows¿¡¼­´Â 
					    // ÄÄÆÄÀϵÇÁö ¾Ê°í, core dump¸¦ ÀÏÀ¸Å²´Ù.
		String(int bb, bool dummy);  // StringBuffer class¸¦ À§ÇØ ÇÊ¿ä
		virtual ~String();  // virtual·Î ¼±¾ðÇÏ¿© »ó¼Ó¹ÞÀº classÀÇ ¼Ò¸êÀÚ°¡
				    // ºÒ¸®µµ·Ï ÇÑ´Ù.

		char *val() {return sval;} // svalÀ» publicÀ¸·Î ÇÏ´Â °ÍÀº À§ÇèÇϹǷÎ

		// JavaÀÇ StringÀ» Èä³»³½ ÇÔ¼öµé
		unsigned long length();
		char charAt(int where);
		void getChars(int sourceStart, int sourceEnd, 
				char target[], int targetStart);
		char* toCharArray();
		char* getBytes();

		bool equals(String str2); // == ¿¬»êÀÚ¸¦ ÂüÁ¶Ç϶ó
		bool equals(char *str2); // == ¿¬»êÀÚ¸¦ ÂüÁ¶Ç϶ó
		bool equalsIgnoreCase(String str2);

		bool regionMatches(int startIndex, String str2, 
				int str2StartIndex, int numChars);
		bool regionMatches(bool ignoreCase, int startIndex, 
				String str2, int str2StartIndex, int numChars);

		String toUpperCase();
		String toLowerCase();

		bool startsWith(String str2);
		bool startsWith(char *str2);

		bool endsWith(String str2);
		bool endsWith(char *str2);

		int compareTo(String str2);
		int compareTo(char *str2);
		int compareToIgnoreCase(String str2);
		int compareToIgnoreCase(char *str2);

		int indexOf(char ch, int startIndex = 0);
		int indexOf(char *str2, int startIndex = 0);
		int indexOf(String str2, int startIndex = 0);

		int lastIndexOf(char ch, int startIndex = 0);
		int lastIndexOf(char *str2, int startIndex = 0);
		int lastIndexOf(String str2, int startIndex = 0);

		String substring(int startIndex, int endIndex = 0);
		String replace(char original, char replacement);
		String replace(char *original, char *replacement);

		String trim(); // ¿À¹ö·Îµù µÈ trimÀ» ÂüÁ¶Ç϶ó.

		String concat(String str2);  // + ¿¬»êÀÚ¸¦ ÂüÁ¶
		String concat(char *str2); // + ¿¬»êÀÚ¸¦ ÂüÁ¶
		String concat(int bb);
		String concat(unsigned long bb);
		String concat(float bb);
		String concat(double bb);

		String reverse(); // ¿À¹ö·Îµù µÈ ´Ù¸¥ reverse()¸¦ ÂüÁ¶
		String deleteCharAt(int loc);
		String deleteStr(int startIndex, int endIndex); // JavaÀÇ "delete()"

		String valueOf(char ch)
			{char aa[2]; aa[0]=ch; aa[1]=0; return String(aa);}
		String valueOf(char chars[]){ return String(chars);}
		String valueOf(char chars[], int startIndex, int numChars);
		String valueOf(bool tf)
			{if (tf) return String("true"); else return String("false");}
		String valueOf(int num){ return String(num);}
		String valueOf(long num){ return String(num);}
		String valueOf(float num) {return String(num);}
		String valueOf(double num) {return String(num);}

		// ÀÌ ÆÄÀÏÀÇ ¾Æ·¡¿¡ ÁÖ¾îÁø StringBuffer¸¦ Âü°íÇ϶ó.

		// ---- ¿©±â±îÁö Java¸¦ Èä³»³½ ÇÔ¼öµé  -----

		//////////////////////////////////////////////////////
		// 		Java¿¡´Â ¾ø´Â Ãß°¡ÀûÀÎ ÇÔ¼öµé
		//////////////////////////////////////////////////////
		String ltrim();
		void ltrim(bool dummy); // Á÷Á¢ÀûÀ¸·Î object¸¦ º¯È­½ÃŲ´Ù.
		String rtrim();
		void rtrim(bool dummy); //  Á÷Á¢ÀûÀ¸·Î object¸¦ º¯È­½ÃŲ´Ù.
					// chopall Âü°í.

		void chopall(char ch='\n'); // ¸Ç µÚÀÇ ch¸¦ ¾ø¾Ø´Ù. rtrim Âü°í.
		void chop(); // ¸Ç µÚÀÇ ¹®ÀÚ¸¦ ¾ø¾Ø´Ù.

		void roundf(float input_val, short precision);
		void decompose_float(long *integral, long *fraction); 

		void roundd(double input_val, short precision);
		void decompose_double(long *integral, long *fraction); 

		void explode(char *separator); // token()°ú ¿À¹ö·Îµù µÈ explode()ÂüÁ¶
		String *explode(int &#38; strcount, char separator = ' '); //  token()ÂüÁ¶
		void implode(char *glue);
		void join(char *glue);
		String repeat(char *input, unsigned int multiplier);
		String tr(char *from, char *to); // characterµéÀ» ¹Ù²Û´Ù(translate).
		String center(int padlength, char padchar = ' ');
		String space(int number = 0, char padchar = ' ');
		String xrange(char start, char end);
		String compress(char *list = " ");
		String left(int slength = 0, char padchar = ' ');
		String right(int slength = 0, char padchar = ' ');
		String overlay(char *newstr, int start = 0, int slength = 0, char padchar = ' ');

		String at(char *regx); // regxÀÇ Ã¹¹ø° match
		String before(char *regx); // regx ¾ÕÀÇ string
		String after(char *regx); // regx µÚÀÇ string
		String mid(int startIndex = 0, int length = 0);

		bool isNull();  
		bool isInteger();
		bool isInteger(int pos);
		bool isNumeric();
		bool isNumeric(int pos);
		bool isEmpty();  // length() == 0 °ú °°Àº »óÅÂ
		bool isUpperCase();
		bool isUpperCase(int pos);
		bool isLowerCase();
		bool isLowerCase(int pos);
		bool isWhiteSpace();
		bool isWhiteSpace(int pos);
		bool isBlackSpace();
		bool isBlackSpace(int pos);
		bool isAlpha();
		bool isAlpha(int pos);
		bool isAlphaNumeric();
		bool isAlphaNumeric(int pos);
		bool isPunct();
		bool isPunct(int pos);
		bool isPrintable();
		bool isPrintable(int pos);
		bool isHexDigit();
		bool isHexDigit(int pos);
		bool isCntrl();
		bool isCntrl(int pos);
		bool isGraph();
		bool isGraph(int pos);

		void clear();
		int toInteger();
		long parseLong();

		double toDouble();
		String token(char separator = ' '); // StringTokenizer¿Í explode()¸¦ ÂüÁ¶
		String crypt(char *original, char *salt);
		String getline(FILE *infp = stdin); // putline() ÂüÁ¶
		//String getline(fstream *infp = stdin); // putline() ÂüÁ¶

		void putline(FILE *outfp = stdout); // getline() ÂüÁ¶
		//void putline(fstream *outfp = stdout); // getline() ÂüÁ¶

		void swap(String aa, String bb); // aa¸¦ bb·Î ¹Ù²Û´Ù
		String *sort(String aa[]);  // StringÀÇ array¸¦ sortÇÑ´Ù
		String sort(int startIndex = 0, int length = 0);  // string ³»ÀÇ characterµéÀ» sort
		int freq(char ch); // ch°¡ µé¾îÀִ Ƚ¼ö¸¦ ¼¾´Ù
		void Format(const char *fmt, ...);
		String replace (int startIndex, int endIndex, String str);

		void substring(int startIndex, int endIndex, bool dummy); // object¸¦ Á÷Á¢ ¹Ù²Û´Ù
		void reverse(bool dummy); // object¸¦ Á÷Á¢ ¹Ù²Û´Ù
		String deleteCharAt(int loc, bool dummy); // object¸¦ Á÷Á¢ ¹Ù²Û´Ù
		String deleteStr(int startIndex, int endIndex, bool dummy);
		void trim(bool dummy); // object¸¦ Á÷Á¢ ¹Ù²Û´Ù
		String insert(int index, String str2);
		String insert(int index, String str2, bool dummy); // object¸¦ Á÷Á¢ ¹Ù²Û´Ù
		String insert(int index, char ch);
		String insert(int index, char ch, bool dummy); // object¸¦ Á÷Á¢ ¹Ù²Û´Ù
		String insert(char *newstr, int start = 0, int length = 0, char padchar = ' ');

		String dump(); // od -c ¿Í °°ÀÌ stringÀ» dumpÇÑ´Ù.

		// JavaÀÇ StringBuffer¸¦ À§ÇØ ÇÊ¿äÇÑ °Íµé
		void ensureCapacity(int capacity);
		void setLength(int len);
		void setCharAt(int where, char ch); // charAt(), getCharAt() Âü°í

		// JavaÀÇ Integer class, Long, Double class¸¦ À§ÇØ ÇÊ¿ä
		int parseInt(String ss) {return ss.toInteger();}
		int parseInt(char *ss)
			{String tmpstr(ss); return tmpstr.toInteger();}
		long parseLong(String ss) {return ss.parseLong();}
		long parseLong(char *ss)
			{String tmpstr(ss); return tmpstr.parseLong();}
		float floatValue() {return (float) toDouble(); }
		double doubleValue() {return toDouble(); }
		char * number2string(int bb);  // String(int) Âü°í
		char * number2string(long bb);  // String(long) Âü°í
		char * number2string(unsigned long bb);  // String(long) Âü°í
		char * number2string(double bb);  // String(double) Âü°í

		///////////////////////////////////////////////
		// 		°ãÄ¡´Â ÇÔ¼ö À̸§µé
		///////////////////////////////////////////////
		// char * c_str() // val() À» ´ë½Å»ç¿ë
		// bool find();  // regionMatches() ¸¦ ´ë½Å»ç¿ë
		// bool search();  // regionMatches() ¸¦ ´ë½Å»ç¿ë
		// bool matches(); // regionMatches() ¸¦ ´ë½Å»ç¿ë
		// int rindex(String str2, int startIndex = 0); lastIndexOf() À» ´ë½Å»ç¿ë
		// String blanks(int slength);  // repeat() ¸¦ ´ë½Å»ç¿ë
		// String append(String str2); // concat() À̳ª + operator À» ´ë½Å»ç¿ë
		// String prepend(String str2);  // + operatorÀ» ´ë½Å»ç¿ë append()Âü°í
		// String split(char separator = ' ');  // token(), explode() ³ª StringTokenizer class ¸¦ ´ë½Å»ç¿ë
		bool contains(char *str2, int startIndex = 0); // indexOf() ¸¦ ´ë½Å»ç¿ë
		// void empty(); is_empty() ¸¦ ´ë½Å»ç¿ë
		// void vacuum(); clear() ¸¦ ´ë½Å»ç¿ë
		// void erase(); clear() ¸¦ ´ë½Å»ç¿ë
		// void zero(); clear() ¸¦ ´ë½Å»ç¿ë
		// bool is_float(); is_numeric(); À» ´ë½Å»ç¿ë
		// bool is_decimal(); is_numeric(); À» ´ë½Å»ç¿ë
		// bool is_Digit(); is_numeric(); À» ´ë½Å»ç¿ë
		// float float_value(); toDouble(); À» ´ë½Å»ç¿ë
		// float tofloat(); toDouble(); À» ´ë½Å»ç¿ë
		// double double_value(); toDouble(); À» ´ë½Å»ç¿ë
		// double numeric_value(); toDouble(); À» ´ë½Å»ç¿ë
		// int int_value(); toInteger() ¸¦ ´ë½Å»ç¿ë
		// int tonumber(); toInteger() ¸¦ ´ë½Å»ç¿ë
		// String get(); substring() À̳ª val() À» ´ë½Å »ç¿ë. ±×·¯³ª Java ½ºÅ¸ÀÏÀÇ substringÀÌ ´õ ÁÁ´Ù
		// String getFrom(); substring() À̳ª val() À» ´ë½Å »ç¿ë. ±×·¯³ª Java ½ºÅ¸ÀÏÀÇ substringÀÌ ´õ ÁÁ´Ù
		// String head(int len); substring(0, len) À» ´ë½Å»ç¿ë
		// String tail(int len); substring(length()-len, length()) ¸¦ ´ë½Å»ç¿ë
		// String cut(); deleteCharAt() À̳ª deleteStr() À» ´ë½Å»ç¿ë
		// String cutFrom(); deleteCharAt() À̳ª deleteStr() À» ´ë½Å»ç¿ë
		// String paste(); insert() ¸¦ ´ë½Å»ç¿ë
		// String fill(); replace() ¸¦ ´ë½Å»ç¿ë
		// char firstChar(); // substring(0, 1); À» ´ë½Å»ç¿ë
		// char lastChar(); // substring(length()-1, length()); ¸¦ ´ë½Å»ç¿ë
		// String findNext(); token(), explode() À̳ª StringTokenizer class ¸¦ ´ë½Å»ç¿ë

		// begin();  iterator. operator [ii]¸¦ ´ë½Å»ç¿ë
		// end();  iterator. operator [ii]¸¦ ´ë½Å»ç¿ë
		// copy();  assignment =  ¿¬»ê´Ù¸¦ ´ë½Å »ç¿ë, String aa = bb;
		// clone();  assignment =  ¿¬»êÀÚ¸¦ ´ë½Å »ç¿ë, String aa = bb;
		// void putCharAt(int where, char ch); setCharAt() À» ´ë½Å»ç¿ë
		// void replaceCharAt(int where, char ch); setCharAt() À» ´ë½Å»ç¿ë
		// char getCharAt(int where); CharAt() À» ´ë½Å»ç¿ë
		// void parseArgs(int where, char ch); StringTokensizer class, token() À̳ª explode() ¸¦ ´ë½Å»ç¿ë
		// void truncate(); trim(), rtrim(), chop() À̳ª chopall() À» ´ë½Å»ç¿ë
		// ¼ýÀÚ¸¦ stringÀ¸·Î º¯È¯ : notostring(), int2str, long2strÀº number2string()À» »ç¿ë

		// ¿¬»êÀÚµé...
		String operator+ (const String &#38; rhs);
		friend String operator+ (const String &#38; lhs, const String &#38; rhs);

		String&#38; operator+= (const String &#38; rhs); // ·¹ÆÛ·±½º¸¦ ÀÌ¿ëÇÏ¸é ´õ ºü¸¦ °ÍÀÌ´Ù.
		String&#38; operator= (const String &#38; rhs); // ·¹ÆÛ·±½º¸¦ ÀÌ¿ëÇÏ¸é ´õ ºü¸¦ °ÍÀÌ´Ù.
		bool operator== (const String &#38; rhs); // ·¹ÆÛ·±½º¸¦ ÀÌ¿ëÇÏ¸é ´õ ºü¸¦ °ÍÀÌ´Ù.
		bool operator== (const char *rhs);
		bool operator!= (const String &#38; rhs);
		bool operator!= (const char *rhs); 
		char operator [] (unsigned long Index) const;
		char&#38; operator [] (unsigned long Index);
		friend ostream &#38;  operator&#60;&#60; (ostream &#38; Out, const String &#38; str2);
		friend istream &#38;  operator&#62;&#62; (istream &#38; In, String &#38; str2);

		bool String::operator&#60; (const char *rhs) const; // map &#38; vector ¸¦ À§ÇÑ À¯¿ëÇÑ method
		bool String::operator&#60; (const String &#38; rhs) const; // map &#38; vector ¸¦ À§ÇÑ À¯¿ëÇÑ method

		//do later: static	list&#60;String&#62; 		explodeH;  // list head

	protected:
		char *sval; // svalÀ» publicÀ¸·Î ÇÏ´Â °ÍÀº À§ÇèÇÏ´Ù.
		void verifyIndex(unsigned long index) const; // Win32¿¡¼­ÀÇ  warning¶§¹®¿¡ inlineÀÌ ¾Æ´Ï´Ù.
		void verifyIndex(unsigned long index, char *aa) const;// Win32¿¡¼­ÀÇ  warning¶§¹®¿¡ inlineÀÌ ¾Æ´Ï´Ù.

		void _str_cat(char bb[]);
		void _str_cat(int bb);
		void _str_cat(unsigned long bb);
		void _str_cat(float bb);

		void _str_cpy(char bb[]);
		void _str_cpy(int bb); // itoa
		void _str_cpy(unsigned long bb);
		void _str_cpy(float bb); // itof

	private:
		// Note: ¸ðµç private º¯¼ö¿Í ÇÔ¼ö´Â _ (¹ØÁÙ)·Î ½ÃÀÛÇÑ´Ù.
		
		//static String *_global_String; // add ¿¬»ê¿¡¼­ ÇÊ¿ä
		//inline void _free_glob(String **aa);

		bool _equalto(const String &#38; rhs, bool type = false);
		bool _equalto(const char *rhs, bool type = false);
		String *_pString;  // ³»ºÎ¿¡¼­ »ç¿ëÇÏ´Â Àӽà Æ÷ÀÎÅÍ
		char *_pNumber2String;  // ³»ºÎ¿¡¼­ »ç¿ëÇÏ´Â Àӽà Æ÷ÀÎÅÍ
		inline void _allocpString();
		inline void _allocpNumber2String();
		inline void Common2AllCstrs();
		inline void _reverse();
		inline void _deleteCharAt(int loc);
		inline void _deleteStr(int startIndex, int endIndex);
		inline void _trim();
		inline void _ltrim();
		inline void _rtrim();
		inline void _substring(int startIndex, int endIndex);
		void _roundno(double input_dbl, float input_flt, short precision, bool type);
};

// Àü¿ªº¯¼ö´Â String.cpp ¿¡¼­ Á¤ÀǵȴÙ

#endif // __STRING_H_ALDEV_
</ProgramListing>

</Para>

<Sect2>
<Title>StringBuffer.h</Title>

<Para>
C++ °ú Java´Â ¸¹Àº ¼ÒÇÁÆ®¿þ¾î ÇÁ·ÎÁ§Æ®¿¡¼­ µ¿½Ã¿¡ ¾²ÀδÙ.
C++°ú Java¸¦ ¿Ô´Ù°¬´ÙÇÏ´Â ÇÁ·Î±×·¡¸Ó¿¡°Ô ÀÌ stringbuffer class´Â ¸Å¿ì À¯¿ëÇÒ °ÍÀÌ´Ù.
</Para>

<Para>

<ProgramListing>
//
// Author : Al Dev  Email: alavoor[AT]yahoo.com
//

#ifndef __STRINGBUFFER_H_ALDEV_
#define __STRINGBUFFER_H_ALDEV_

// JavaÀÇ StringBuffer ¸¦ ¸ð¹æÇÑ °Í
// ÀÌ class´Â JavaÀÇ code¸¦ ÃÖ¼ÒÇÑÀÇ ¼öÁ¤¸¸À¸·Îµµ
// C++¿¡¼­ µ¿ÀÛÇϵµ·Ï Çϱâ À§ÇØ ¸¸µé¾îÁ³´Ù.
// Note: C++·Î ÄÚµùÇÏ´Â µ¿¾ÈÀº ÀÌ StringBuffer
// class¸¦ *¾²Áö ¸»¾Æ¶ó*.
// ÀÌ class´Â ¿ÀÁ÷ Java Äڵ带 cut/pasteÇÏ´Â °æ¿ì¸¦
// À§Çؼ­ ¾²¿©Áø °ÍÀÌ´Ù.
class StringBuffer: public String
{
	public:
		StringBuffer();
		~StringBuffer();
		StringBuffer(char *aa);
		StringBuffer(int size);
		StringBuffer(String str);

		int capacity();
		StringBuffer append(String str2);
			// operator + ÂüÁ¶
			//{ *this += str2; return *this;} // ÀÌ code´Â core dump¸¦ ÀÏÀ¸Å²´Ù

		StringBuffer append(char *str2);
		StringBuffer append(int bb);
		StringBuffer append(unsigned long bb) ;
		StringBuffer append(float bb) ;
		StringBuffer append(double bb) ;

		StringBuffer insert(int index, String str2);
		StringBuffer insert(int index, char ch);

		StringBuffer reverse();

		// JavaÀÇ "delete()"¿¡ ÇØ´ç. (delete´Â C++ÀÇ keywordÀ̹ǷΠ»ç¿ëÇÏÁö ¸øÇÑ´Ù)
		StringBuffer deleteStr(int startIndex, int endIndex);
		StringBuffer deleteCharAt(int loc);

		StringBuffer substring(int startIndex, int endIndex = 0);
		void assign(char *str);

	private:
		StringBuffer *_pStringBuffer;
		inline void allocpStringBuffer();
		inline void Common2AllCstrs();
};

#endif // __STRINGBUFFER_H_ALDEV_
</ProgramListing>

</Para>

</Sect2>

<Sect2>
<Title>StringTokenizer.h</Title>

<Para>
C++ °ú Java´Â ¸¹Àº ¼ÒÇÁÆ®¿þ¾î ÇÁ·ÎÁ§Æ®¿¡¼­ µ¿½Ã¿¡ ¾²ÀδÙ.
C++°ú Java¸¦ ¿Ô´Ù°¬´ÙÇÏ´Â ÇÁ·Î±×·¡¸Ó¿¡°Ô ÀÌ stringtokenizer class´Â ¸Å¿ì À¯¿ëÇÒ °ÍÀÌ´Ù.
</Para>

<Para>

<ProgramListing>
//
// Author : Al Dev  Email: alavoor[AT]yahoo.com
//

#ifndef __STRINGTOKENIZER_H_ALDEV_
#define __STRINGTOKENIZER_H_ALDEV_

// JavaÀÇ StringBuffer ¸¦ ¸ð¹æÇÑ °Í
// JavaÀÇ Äڵ带 C++¿¡¼­ ȤÀº ±× ¹Ý´ë·Î ÄÄÆÄÀÏÇÏ´Â °ÍÀÌ
// °¡´ÉÇÏ°Ô ¸¸µé¾îÁ³´Ù.
class StringTokenizer: public String
{
	public:
		StringTokenizer(String str);
		StringTokenizer(String str, String delimiters);
		StringTokenizer(String str, String delimiters, bool delimAsToken);
		~StringTokenizer();

		int 	countTokens();
		bool 	hasMoreElements();
		bool 	hasMoreTokens();
		String 	nextElement(); // Java¿¡¼­´Â "Object"typeÀ» returnÇÑ´Ù.
		String 	nextToken();
		String 	nextToken(String delimiters);
	private:
		int		CurrentPosition; // ÇöÀç string¿¡¼­ÀÇ index
		int		TotalTokens;
		int		RemainingTokens;
		char *	ListOfDl; // delimiters(±¸ºÐÀÚ)µéÀÇ list
		char * 	WorkStr; // Àӽà ÀÛ¾÷ string
		char * 	OrigStr; // Áö³ª¿Â original string
		bool  	DlFlag;  // ±¸ºÐÀÚÀÎÁö¸¦ ³ªÅ¸³»´Â flag
		inline 	void vPrepWorkStr(char *delimiters = NULL);
};

#endif // __STRINGTOKENIZER_H_ALDEV_
</ProgramListing>

</Para>

</Sect2>

</Sect1>

<Sect1 id="standard-string">
<Title> Ç¥ÁØ C++ ¶óÀ̺귯¸® string class </Title>

<Para>
À§¿¡ ¾ð±ÞµÈ String class (S°¡ ´ë¹®ÀÚÀÎ °Í¿¡ ÁÖÀÇ!)´Â Java¸¦ »ç¿ëÇÏ´Â »ç¶÷µéÀ»
À§ÇÑ °ÍÀÎ ¹Ý¸é, Ç¥ÁØ C++ ¶óÀ̺귯¸®¿¡¼­ Á¦°øµÇ´Â "ÁøÂ¥" string class¸¦ ÁÖ¸ñÇÒ
ÇÊ¿ä°¡ ÀÖ´Ù.
</Para>

<Para>
string class´Â C¿¡¼­ÀÇ °¡Àå Å« ¹®Á¦Á¡ Áß ÇϳªÀÎ ¹®Àڹ迭ÀÇ ´ÜÁ¡À» ±Øº¹Çϱâ À§ÇØ
¸¸µé¾îÁ³´Ù. ¹®Àڹ迭ÀÌ ¹«Ã´ ºü¸£±ä ÇÏÁö¸¸, ¸¹Àº ´ÜÁ¡À» °®°í ÀÖ´Ù.
¹®Àڹ迭Àº ¸¹Àº ¹ö±×ÀÇ ¿øÀÎÀÌ°í, À̸¦ parsingÇÏ´Â ÀÏÀº ±²ÀåÈ÷ ±ÍÂúÀº ÀÏÀÌ´Ù.
</Para>

<Para>
string class´Â ¹®ÀÚ¿­À» ÆĽÌÇÏ°í, Á¶Á¤Çϴµ¥ ÇÊ¿äÇÑ ÁÁÀº ÀÎÅÍÆäÀ̽º¸¦ Á¦°øÇÏ°í,
STL°úµµ ȣȯ°¡´ÉÇÏ´Ù. Áï, ¸ðµç STLÀÇ ¾Ë°í¸®ÁòÀ» »ç¿ëÇÒ ¼ö ÀÖ´Ù.
½ÇÁ¦·Î ¹®ÀÚ¿­Àº <Emphasis remap="bf">vector&lt;char&gt;</Emphasis>
( ¹®ÀÚµéÀ» À§ÇÑ container ȤÀº Áøº¸µÈ ¹®Àڹ迭 )
·Î Ãë±ÞµÉ ¼ö ÀÖ´Ù.
</Para>

<Para>
´ÙÀ½ÀÇ »çÀÌÆ®¿¡¼­ Âü°íÇÒ¸¸ÇÑ °ÍµéÀ» ¾òÀ» ¼ö ÀÖ´Ù:

<ItemizedList>
<ListItem>

<Para>
SGI STL ±âÃÊ&lowbar;string reference: <ULink
URL="http://www.sgi.com/tech/stl/basic_string.html"
>http://www.sgi.com/tech/stl/basic_string.html</ULink
>.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Sect2>
<Title>¿¹Á¦·Î »ìÆ캸´Â string</Title>

<Para>
stringÀ» ¸¸µå´Â °ÍÀº ½±´Ù.
Creating a string is easy:

<ProgramListing>
#include &#60;string&#62;
#include &#60;iostream&#62;

using namespace std;

int main()
{
    string str("Hello World!"); // ȤÀº string str = "Hello World!";
    cout &#60;&#60; str &#60;&#60; endl;
}

</ProgramListing>

</Para>

<Para>
ÀÌ ÄÚµå´Â "<Emphasis remap="bf">str</Emphasis>'¶õ stringÀ» ¸¸µé°í, "<Emphasis remap="bf">Hello
World!</Emphasis>' ¶ó´Â ³»¿ëÀ» ³ÖÀ» °ÍÀÌ´Ù.
±×¸®°í coutÀ» »ç¿ëÇÏ¿© Ç¥ÁØÃâ·Â(stdout)À¸·Î Ãâ·ÂÇÒ °ÍÀÌ´Ù.

</Para>

<Para>
(ÀÌÁ¦ºÎÅÍ ¸ðµç Çì´õ¿Í namespace °ü·ÃºÎºÐÀº »ý·«ÇÒ °ÍÀÌ´Ù.)
</Para>

<Para>
¹®ÀÚ¿­ÀÇ ºÎºÐÀ» ±¸ÇÏ´Â °Í ¿ª½Ã ½±´Ù :

<ProgramListing>
string str("Hello Universe!");
string start = str.substr(0, 5);
string end = str.substr(5);
</ProgramListing>

</Para>

<Para>
¿©±â¼­´Â ù 6±ÛÀÚ¸¦ string "<Emphasis remap="bf">start</Emphasis>"¿¡, ³ª¸ÓÁö´Â 
"<Emphasis remap="bf">end</Emphasis>"¿¡ µé¾î°¥ °ÍÀÌ´Ù.
</Para>

<Para>
¹®ÀÚ¿­ÀÇ ±æÀ̸¦ ¾ò±â À§Çؼ­´Â, ¾Æ·¡¿Í °°ÀÌ ÇÏ¸é µÈ´Ù.

<ProgramListing>
string str("How long is this string?");
cout &#60;&#60; "Length of string is: " &#60;&#60; str.size() &#60;&#60; endl;
</ProgramListing>

</Para>

<Para>
ȤÀº ÀÌ¿Í Á¤È®È÷ ¶È°°Àº ¿ªÇÒÀ» ÇÏ´Â <Emphasis remap="bf">length()</Emphasis> ¸¦ ½áµµ µÈ´Ù.
</Para>

</Sect2>

<Sect2>
<Title>¹®ÀÚ¿­À» ã±â</Title>

<Para>
¹®ÀÚ¿­À» ã´Â °ÍÀº ¹®Àڹ迭º¸´Ù ÈξÀ ½±´Ù. string class´Â ¹®ÀÚ¿­À» ã´Âµ¥
È¿À²ÀûÀÎ ¸â¹ö ÇÔ¼öµéÀ» Á¦°øÇÑ´Ù.
¸ðµç ¸â¹öÇÔ¼ö´Â string::size&lowbar;type À» returnÇÑ´Ù.

<Table>
<Title><Emphasis remap="bf">¹®ÀÚ¿­ °Ë»ö ¸â¹ö ÇÔ¼ö</Emphasis></Title>

<TGroup Cols="3">
<ColSpec Align="Right" Colsep="0">
<ColSpec Align="Left" Colsep="0">
<ColSpec Align="Left" Colsep="0">
<TBody>
<Row>
<Entry>¸â¹ö ÇÔ¼ö</Entry>
<Entry>ÀÛµ¿</Entry>
</Row>
<Row>
<Entry>
find() </Entry>
<Entry>
ÁÖ¾îÁø ºÎºÐ¹®ÀÚ¿­ÀÌ Ã³À½À¸·Î ³ªÅ¸³ª´Â °÷À» ã´Â´Ù
</Entry>
</Row>
<Row>
<Entry>
find&lowbar;first&lowbar;of() </Entry>
<Entry>
find()¿Í °°À¸³ª ÁÖ¾îÁø ¹®ÀÚ°¡ óÀ½À¸·Î ³ªÅ¸³ª´Â À§Ä¡¸¦ ã´Â´Ù
</Entry>
</Row>
<Row>
<Entry>
find&lowbar;last&lowbar;of() </Entry>
<Entry>
find&thinsp;first&thinsp;of()¿Í °°À¸³ª, ÁÖ¾îÁø ¹®ÀÚ°¡ ¸¶Áö¸·À¸·Î ³ªÅ¸³ª´Â À§Ä¡¸¦ ã´Â´Ù
</Entry>
</Row>
<Row>
<Entry>
find&lowbar;first&lowbar;not&lowbar;of() </Entry>
<Entry>find&thinsp;first&thinsp;of() °ú °°À¸³ª ÁÖ¾îÁø ¹®ÀÚ°¡ ¾Æ´Ñ ù ¹®ÀÚ°¡ óÀ½À¸·Î
³ªÅ¸³ª´Â À§Ä¡¸¦ ã´Â´Ù
</Entry>
</Row>
<Row>
<Entry>
find&lowbar;last&lowbar;not&lowbar;of() </Entry>
<Entry>find&thinsp;last&thinsp;of() °ú °°À¸³ª ÁÖ¾îÁø ¹®ÀÚ°¡ ¾Æ´Ñ ¹®ÀÚ¸¦ ã´Â´Ù.</Entry>
</Row>
<Row>
<Entry>
rfind() </Entry>
<Entry>find()¿Í °°À¸³ª, ã´Â ¹æÇâÀÌ ¹Ý´ëÀÌ´Ù. (µÚÂʺÎÅÍ Ã£´Â´Ù)</Entry>
</Row>
<Row>
<Entry>
</Entry>
</Row>
</TBody>

</TGroup>

</Table>

</Para>

<Para>
°¡Àå ÈçÇÑ »óȲÀº ¹®ÀÚ¿­À» ã´Â °ÍÀÌ°í, ÀÌ´Â 
 <Emphasis remap="bf">find()</Emphasis> ÇÔ¼ö¸¦ »ç¿ëÇÏ¸é µÈ´Ù.

<ProgramListing>
string str("Hello, can you find Ben?");
string::size_type position = str.find("Ben");
cout &#60;&#60; "First occurence of Ben was found at: " &#60;&#60; position &#60;&#60; endl;
</ProgramListing>

</Para>

<Para>
ÀÌ ÄÚµå´Â '<Emphasis remap="bf">Ben</Emphasis>'¿¡ ´ëÇØ ´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏ´Â °Ë»öÀ» ÇÏ°í,
½ÃÀÛÀ§Ä¡¸¦ '<Emphasis remap="bf">position</Emphasis>'¿¡ string::size&lowbar;type ŸÀÔÀ¸·Î ³Ö´Â´Ù.
¸®ÅÏÇÏ´Â °ªÀÌ int°¡ ¾Æ´Ï¶ó Ưº°È÷ °í¾ÈµÈ string::size&lowbar;type ŸÀÔÀ̶ó´Âµ¥ ÁÖÀÇÇ϶ó.
</Para>

<Para>
<Emphasis remap="bf">find&lowbar;first&lowbar;of()</Emphasis> 
ÇÔ¼ö´Â ½ÇÁ¦ÀûÀÎ ¿¹°¡ ÇÊ¿äÇÒ °ÍÀÌ´Ù.
¾Æ·¡¿Í °°Àº »óȲÀ» º¸ÀÚ.
</Para>

<Para>

<ProgramListing>
string s = "C++ is an impressive language.";
string::size_type pos = s.find_first_of(" .");

while (pos != string::npos) {
    cout &#60;&#60; "Found space or dot at: " &#60;&#60; pos &#60;&#60; endl;
    pos = s.find_first_of(" .", pos + 1);
}
</ProgramListing>

</Para>

<Para>
<Emphasis remap="bf">find&lowbar;first&lowbar;of()</Emphasis>ÇÔ¼ö¸¦ ¾²¸é,
¿ì¸®´Â ù¹ø° ÀÎÀÚÀÇ <Emphasis remap="bf">¸ðµç</Emphasis> ¹®ÀÚ¸¦ ã°Ô µÇ°í,
µû¶ó¼­ ¿©±â¼­´Â ½ºÆäÀ̽º(' ') ȤÀº Á¡('.')À» ã°Ô µÈ´Ù.
</Para>

<Para>
ÇÁ·Î±×·¥À» ÄÄÆÄÀÏÇؼ­ ¾î¶»°Ô Ãâ·ÂµÇ´ÂÁö º¸¾Æ¶ó.
</Para>

</Sect2>

<Sect2>
<Title>string tokenizer</Title>

<Para>
¹®ÀÚ¿­À» °¡Áö°í ÀÚÁÖ ÇϰԵǴ ÀÛ¾÷ Áß Çϳª´Â, ¾î¶² ±¸ºÐÀÚ¸¦ °¡Áö°í ÅäÅ«µé·Î
³ª´©´Â °ÍÀÌ´Ù (tokenize). tokenizer´Â ¹®ÀÚ¿­À» find()¸¦ °è¼Ó ºÎ¸£´Â ÀÏ ¾øÀÌ
½±°Ô Á¶±×¸¸ Á¶°¢µé·Î ÂÉ°¶ ¼ö ÀÖµµ·Ï ÇØÁØ´Ù. C¿¡¼­´Â, ¾Æ¸¶µµ ¹®ÀÚ ¹è¿­¿¡ ´ëÇØ
<Emphasis remap="bf">strtok()</Emphasis> ¶õ ÇÔ¼ö¸¦ ½èÀ» °ÍÀÌÁö¸¸,
¹®ÀÚ¿­¿¡ ´ëÇؼ­´Â ÀÌ·¯ÇÑ ÇÔ¼ö°¡ ¾ø´Ù. µû¶ó¼­ Á÷Á¢ ÀÌ·± ÇÔ¼ö¸¦ ¸¸µé¾î¾ß °ÚÁö¸¸,
¸î°¡Áö ÇØ°áÃ¥ÀÌ ÀÖ´Ù.
</Para>

<Para>
The advanced tokenizer:

<ProgramListing>
void Tokenize(const string&#38; str,
                      vector&#60;string&#62;&#38; tokens,
                      const string&#38; delimiters = " ")
{
    // ¸Ç ù ±ÛÀÚ°¡ ±¸ºÐÀÚÀÎ °æ¿ì ¹«½Ã
    string::size_type lastPos = str.find_first_not_of(delimiters, 0);
    // ±¸ºÐÀÚ°¡ ¾Æ´Ñ ù ±ÛÀÚ¸¦ ã´Â´Ù
    string::size_type pos     = str.find_first_of(delimiters, lastPos);

    while (string::npos != pos || string::npos != lastPos)
    {
        // tokenÀ» ã¾ÒÀ¸´Ï vector¿¡ Ãß°¡ÇÑ´Ù
        tokens.push_back(str.substr(lastPos, pos - lastPos));
        // ±¸ºÐÀÚ¸¦ ¶Ù¾î³Ñ´Â´Ù.  "not_of"¿¡ ÁÖÀÇÇ϶ó
        lastPos = str.find_first_not_of(delimiters, pos);
        // ´ÙÀ½ ±¸ºÐÀÚ°¡ ¾Æ´Ñ ±ÛÀÚ¸¦ ã´Â´Ù
        pos = str.find_first_of(delimiters, lastPos);
    }
}
</ProgramListing>

</Para>

<Para>
tokenizer´Â ´ÙÀ½°ú °°ÀÌ ¾²ÀÏ ¼ö ÀÖ´Ù.

<ProgramListing>
#include &#60;string&#62;
#include &#60;algorithm&#62;
#include &#60;vector&#62;

using namespace std;

int main()
{
    vector&#60;string&#62; tokens;

    string str("Split me up! Word1 Word2 Word3.");

    Tokenize(str, tokens);

    copy(tokens.begin(), tokens.end(), ostream_iterator&#60;string&#62;(cout, ", "));
}
</ProgramListing>

</Para>

<Para>
À§ÀÇ ÄÚµå´Â Tokenize ÇÔ¼ö¸¦ »ç¿ëÇÏ´Â ¿¹·Î¼­, ù¹ø° ÀÎÀÚÀÎ
<Emphasis remap="bf">str</Emphasis>¸¦ ÂÉ°µ´Ù. ±×¸®°í ¿ì¸®°¡ ¼¼ ¹ø° ÀÎÀÚ¸¦ ÁÖÁö
¾Ê¾Ò±â ¶§¹®¿¡ µðÆúÆ®·Î ¼³Á¤µÈ " "(spacebar)¸¦ ±¸ºÐÀÚ·Î »ç¿ëÇÑ´Ù.
±×¸®°í ¸ðµç element´Â <Emphasis remap="bf">tokens</Emphasis> º¤ÅÍ¿¡ µé¾î°¡°Ô µÉ °ÍÀÌ´Ù.
</Para>

<Para>
¸¶Áö¸·À¸·Î Ç¥ÁØ Ãâ·Â¿¡ º¤ÅÍ Àüü¸¦ copy()ÇÔÀ¸·Î½á º¤ÅÍÀÇ ³»¿ëÀ» È­¸éÀ¸·Î
º¼ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
</Para>

<Para>
¶Ç´Ù¸¥ Á¢±Ù ¹æ¹ýÀº stringstreamÀ» »ç¿ëÇÏ´Â °ÍÀÌ´Ù. C++¿¡¼­  streamÀº Ư¼öÇÑ
±â´ÉÀÌ Çϳª Àִµ¥, ÀÌ´Â °ø¹é(whitespace)¸¦ ¸¸³¯ ¶§±îÁö Àб⸦ °è¼ÓÇÑ´Ù´Â °ÍÀÌ´Ù.
µû¶ó¼­ ¾Æ·¡ÀÇ ÄÚµå´Â °ø¹éÀ» ±âÁØÀ¸·Î ¹®ÀÚ¿­À» ³ª´©°íÀÚ ÇÒ ¶§ Àß µ¿ÀÛÇÒ °ÍÀÌ´Ù.
</Para>

<Para>

<ProgramListing>
#include &#60;vector&#62;
#include &#60;string&#62;
#include &#60;sstream&#62;

using namespace std;

int main()
{
    string str("Split me by whitespaces");
    string buf; // ¹öÆÛ string
    stringstream ss(str); // stringÀ» stream¿¡ ³Ö´Â´Ù

    vector&#60;string&#62; tokens; // wordµéÀ» ³ÖÀ» vector

    while (ss &#62;&#62; buf)
        tokens.push_back(buf);
}
</ProgramListing>

</Para>

<Para>
ÀÌÁ¦ stringstreamÀº Ãâ·Â ¿¬»êÀÚ(&gt;&gt;)¸¦ »ç¿ë ÇÏ¿© ¹®ÀÚ¿­À» <Emphasis remap="bf">buf</Emphasis>
¿¡ °ø¹éÀ» ¸¸³¯ ¶§¸¶´Ù ³Ö´Â´Ù.
<Emphasis remap="bf">buf</Emphasis>´Â À̸¦ Â÷·Ê´ë·Î º¤ÅÍ¿¡ push&lowbar;back() ÇÑ´Ù.
±×¸®°í ÀÌÁ¦ <Emphasis remap="bf">tokens</Emphasis> º¤ÅÍ´Â <Emphasis remap="bf">str</Emphasis> ¿¡
µé¾îÀÖ´Â ¸ðµç ´Ü¾î¸¦ °®°Ô µÈ´Ù.
</Para>

</Sect2>

</Sect1>

<Sect1>
<Title>File class</Title>

<Para>
C++ °ú Java´Â ¸¹Àº ¼ÒÇÁÆ®¿þ¾î ÇÁ·ÎÁ§Æ®¿¡¼­ µ¿½Ã¿¡ ¾²ÀδÙ.
C++°ú Java¸¦ ¿Ô´Ù°¬´ÙÇÏ´Â ÇÁ·Î±×·¡¸Ó¿¡°Ô ÀÌ File class´Â ¸Å¿ì À¯¿ëÇÒ °ÍÀÌ´Ù.
</Para>

<Para>
¿î¿µÃ¼Á¦ÀÇ ÆÄÀÏÀ» °ü¸®ÇÒ ¶§, File class°¡ ÇÊ¿äÇÒ °ÍÀÌ´Ù. ÀÌ class´Â
JavaÀÇ File class¸¦ ¸ð¹æÇÑ °ÍÀ¸·Î, C++ ÇÁ·Î±×·¡¹Ö¿¡¼­ ¸Å¿ì À¯¿ëÇÒ °ÍÀÌ´Ù.
C++¿¡¼­ ÀÌ class¸¦ »ç¿ëÇϸé, ÆÄÀÏÀÌ Á¸ÀçÇÏ´ÂÁö(<Emphasis remap="bf">exists()</Emphasis>),
µð·ºÅ丮°¡ Á¸ÀçÇÏ´ÂÁö(<Emphasis remap="bf">exists()</Emphasis>),
ÆÄÀÏÀÇ ±æÀÌ´Â ¾î¶²Áö(<Emphasis remap="bf">length()</Emphasis>) µîÀ» ¾Ë ¼ö ÀÖ´Ù.
</Para>

<Para>
ÀÌ class°¡ Ç¥ÁØ C++ ¶óÀ̺귯¸®¿¡´Â ¾ø´Â ÁÁÀº ±â´ÉµéÀ» °®°í ÀÖ´Ù´Â µ¥ ÁÖ¸ñÇضó.
±×·¯³ª ¿©·¯°¡Áö ´Ù¸¥ µ¿ÀÛÀ» ÇØÁÖ¾î¾ß ÇÏ´Â fstreams(iostreams)°ú Çò°¥¸®Áö´Â ¸»¾Æ¶ó.
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
 C++ File class ´Â ´ÙÀ½¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù
File.h
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/File.h"
>http://www.angelfire.com/country/aldev0/cpphowto/File.h</ULink
>
¿Í File.cpp
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>File.cpp</ULink
>
'Source code of C++'¸¦ click Ç϶ó.
</Para>
</ListItem>
<ListItem>

<Para>
 Java: Java.io.File class <ULink
URL="http://java.sun.com/j2se/1.3/docs/api/java/io/File.html"
>http://java.sun.com/j2se/1.3/docs/api/java/io/File.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 JavaÀÇ File Class ·¹ÆÛ·±½º <ULink
URL="http://unicornsrest.org/reference/java/qref11/java.io.File.html"
>http://unicornsrest.org/reference/java/qref11/java.io.File.html</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect1>

<Sect1 id="memory-allocation">
<Title> C++ ¿¡¼­ÀÇ ¸Þ¸ð¸® ÇÒ´ç</Title>

<Para>
C¿¡¼­´Â, ¸Þ¸ð¸®ÀÇ ÇÒ´ç°ú ÇØÁ¦¸¦ À§ÇØ malloc()°ú free()¸¦ ºñ·ÔÇÑ malloc()°è¿­ÀÇ ÇÔ¼ö¸¦ 
¾²Áö¸¸, ´Ùµé ´ÜÁ¡À» °®°í ÀÖ´Ù.
±×·¡¼­ C++ Àº ¸Þ¸ð¸®¸¦ ´Ù·ç±â À§ÇÑ ¿¬»êÀÚµéÀ» µµÀÔÇß°í, À̵éÀº 
<Emphasis remap="bf">new</Emphasis> ¿Í <Emphasis remap="bf">delete</Emphasis>ÀÌ´Ù.
ÀÌ ¿¬»êÀÚµéÀº ½ÇÇà½Ã¿¡ Èü(heap - ȤÀº ÀÚÀ¯ °ø°£)À¸·ÎºÎÅÍ ¸Þ¸ð¸®¸¦ ÇÒ´ç, ÇØÁ¦ÇÑ´Ù.
</Para>

<Para>
C++¿¡¼­´Â Á¤¸»·Î ²À malloc()À̳ª free()¸¸À» ½á¾ßÇÏ´Â »óȲÀÌ ¾Æ´Ï¶ó¸é ¾ðÁ¦³ª 
<Emphasis remap="bf">new</Emphasis> ¿Í <Emphasis remap="bf">delete</Emphasis>¸¦ ½á¾ßÇÑ´Ù.
±×·¯³ª ÁÖÀÇÇÒ Á¡Àº, ÀÌ µÎ °¡Áö¸¦ ¼¯¾î¼­ ¾²¸é ¾ÈµÈ´Ù´Â °ÍÀÌ´Ù.
malloc()À¸·Î ¾òÀº ¸Þ¸ð¸®¸¦ delete·Î ÇØÁ¦ÇÒ ¼ö´Â ¾ø°í, ¹Ý´ë·Î new·Î ¾òÀº ¸Þ¸ð¸®¸¦
free()½Ãų ¼öµµ ¾ø´Ù.
</Para>

<Sect2 id="zap">
<Title>C++ Zap (Delete) ÇÔ¼ö</Title>

<Para>
C++¿¡¼­ÀÇ 
<Emphasis remap="bf">delete</Emphasis> ¿Í <Emphasis remap="bf">new</Emphasis>
¿¬»êÀÚ´Â CÀÇ malloc, freeº¸´Ù ³´´Ù. µû¶ó¼­ malloc°ú free ´ë½Å new¿Í zap(delete)¸¦
¾²µµ·Ï ÇÏ´Â °ÍÀÌ ÁÁ´Ù.
</Para>

<Para>
<Emphasis remap="bf">delete</Emphasis>  ¿¬»êÀÚ°¡ Á» ´õ ±ò²ûÇÏ°Ô
»ç¿ëµÇ°Ô ÇϱâÀ§ÇØ ´ÙÀ½°ú °°Àº Zap() inline ÇÔ¼ö¸¦ ¸¸µéÀÚ.
´ÙÀ½°ú °°ÀÌ zap()À» Á¤ÀÇÇÏÀÚ.

<ProgramListing>
// x°¡ NULLÀÎÁö üũÇϱâ À§ÇØ assert¸¦ »ç¿ëÇÏ¿´´Ù.
// ÀÌ´Â ÇÁ·Î±×·¥ÀÇ "³í¸®Àû" ¿¡·¯¸¦ ¹Ì¸® Àâ¾Æ³»±â À§ÇÑ °ÍÀÌ´Ù.
// delete°¡ NULLÀÎ °æ¿ì¿¡µµ Àß µ¿ÀÛÇϱä ÇÏÁö¸¸, assert¸¦
// »ç¿ëÇÔÀ¸·Î½á Á» ´õ ÀÏÂï ¿¡·¯¸¦ Àâ¾Æ³¾ ¼ö ÀÖ´Ù.

// ZapÀ» templateÀ» »ç¿ëÇÏ¿© Á¤ÀÇÇÏÀÚ.
// delete´ë½Å zapÀ» »ç¿ëÇÏ¸é ´õ ±ò²ûÇÒ °ÍÀÌ´Ù.
template &#60;class T&#62;
inline void zap(T &#38; x)
{
	{assert(x != NULL);}
	delete x;
	x = NULL;
}

// C++¿¡ µÎ °¡Áö delete ¿¬»êÀÚÀÇ ¿ë¹ýÀÌ ÀÖ´Â ÀÌÀ¯´Â C++ ¿¡°Ô
// ÇÑ °´Ã¼¿¡ ´ëÇÑ Æ÷ÀÎÅÍ¿Í °´Ã¼ÀÇ ¹è¿­¿¡ ´ëÇÑ Æ÷ÀÎÅ͸¦ ±¸º°Çϵµ·Ï
// ¸»ÇØÁÖ´Â ¹æ¹ýÀÌ ÇÊ¿äÇϱ⠶§¹®ÀÌ´Ù.
// delete¿¬»êÀÚ´Â ÇÁ·Î±×·¡¸Ó¿¡°Ô "[]"¸¦ ¾²°ÔÇÔÀ¸·Î½á À̸¦ ±¸º°ÇÑ´Ù.
// µû¶ó¼­ ¿ì¸®´Â Æ÷ÀÎÅÍÀÇ ¹è¿­À» Áö¿ì±â À§ÇÑ zaparr ÇÔ¼ö¸¦ ´ÙÀ½°ú °°ÀÌ Á¤ÀÇÇÒ ¼ö ÀÖ´Ù
template &#60;class T&#62;
inline void zaparr(T &#38; x)
{
	 {assert(x != NULL);}
     delete [] x;
     x = NULL;
}
</ProgramListing>

</Para>

<Para>
zap()ÇÔ¼ö´Â Æ÷ÀÎÅ͸¦ delete½ÃÅ°°í NULL·Î ¼¼ÆÃÇÑ´Ù.
ÀÌ´Â ¶È°°Àº delete Æ÷ÀÎÅÍ¿¡ ´ëÇØ ¿©·¯¹øÀÇ zap()ÀÌ
ºÒ·Á¼­ ÇÁ·Î±×·¥ÀÌ ¸Á°¡Áö´Â °ÍÀ» ¹æÁöÇÑ´Ù.
´ÙÀ½ÀÇ zap&lowbar;example()ÇÔ¼ö¸¦ º¸¾Æ¶ó.
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>example_String.cpp</ULink
>
'Source code of C++'À» Ŭ¸¯Çضó.
</Para>

<Para>

<ProgramListing>
	//  example_String.cpp¿¡¼­ zap_example()¸¦ º¸¶ó.
	zap(pFirstname);
	//zap(pFirstname); // pFirstnameÀÌ NULLÀ̹ǷΠÄÚ¾î ´ýÇÁ°¡ ÀϾÁö ¾Ê´Â´Ù.
	//zap(pFirstname); // pFirstnameÀÌ NULLÀ̹ǷΠÄÚ¾î ´ýÇÁ°¡ ÀϾÁö ¾Ê´Â´Ù.

	zap(pLastname);
	zap(pJobDescription);

	int *iiarray = new int[10];
	zaparr(iiarray);
</ProgramListing>

</Para>

<Para>
¹¹ Ưº°ÇÑ °ÍÀÌ ÀÖ´Â °ÍÀº ¾Æ´Ï°í, ÀÌ°ÍÀº ´ÜÁö ¹Ýº¹ÀûÀÎ Äڵ带 ÁÙÀÌ°í
ŸÀÌÇÎÇÏ´Â ½Ã°£À» ¾Æ²¸ÁÖ¸ç ÇÁ·Î±×·¥À» Á» ´õ Àбâ ÁÁ°Ô ¸¸µé¾îÁÖ´Â °Í »ÓÀÌ´Ù.
C++ ÇÁ·Î±×·¡¸ÓµéÀº ÀÚÁÖ deleteÇÑ pointer¸¦ NULL·Î ¼¼ÆÃÇÏ´Â °ÍÀ» Àش´Ù.
±×¸®°í ÀÌ´Â ÄÚ¾î´ýÇÁ¿Í ¿ÀÀÛµ¿À¸·Î À̾îÁú ¼ö ÀÖ´Ù.
zap()Àº ÀÌ·¯ÇÑ ¹®Á¦¸¦ ÀÚµ¿À¸·Î ó¸®ÇØÁØ´Ù.
zap()¿¡ ŸÀÔ Ä³½ºÆÃÀ» ÇÒ ÇÊ¿ä´Â ¾ø´Ù. ¸¸¾à À§ zap()ÇÔ¼ö¿¡¼­ ¿¡·¯°¡ ³­´Ù¸é,
´Ù¸¥ µ¥¼­ ½ÃÀÛµÈ ¿¡·¯ÀÏ °ÍÀÌ´Ù.
</Para>

<Para>
¶ÇÇÑ
<XRef LinkEnd="my-malloc">
, my&lowbar;realloc() °ú my&lowbar;free() ÀÌ
malloc(), realloc() ±×¸®°í free() ´ë½Å ¾²¿©¾ß ÇÑ´Ù.
À̵éÀº ÈξÀ ±ò²ûÇÏ°í, ¿©·¯°¡Áö üũµµ ÇØÁØ´Ù.
¿¹¸¦µé¾î, 
<XRef LinkEnd="my-malloc"> °ú 
my&lowbar;free() ÇÔ¼ö¸¦ »ç¿ëÇÏ´Â "String.h" ÆÄÀÏÀ» º¸¶ó.
</Para>

<Para>
<Emphasis remap="bf">ÁÖÀÇ :</Emphasis> 
'new'·Î ÇÒ´çµÈ ¸Þ¸ð¸®¸¦ ÇØÁ¦Çϱâ À§ÇØ free()¸¦ ¾²°Å³ª, malloc()À¸·Î ÇÒ´çµÈ
¸Þ¸ð¸®¸¦ ÇØÁ¦Çϱâ À§ÇØ 'delete'¸¦ ¾²Áö ¸»¾Æ¶ó. ±×·¸Áö ¾ÊÀ¸¸é
°á°ú¸¦ ¿¹ÃøÇÒ ¼ö ¾ø´Â ¿¡·¯¿¡ ºüÁú °ÍÀÌ´Ù.
</Para>

<Para>
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>example_String.cpp</ULink
> ¿¡¼­ 'Source code of C++' ¸¦ Ŭ¸¯ÇÑ´ÙÀ½, zapÇÔ¼öÀÇ ¿¹¸¦ º¸¾Æ¶ó.
</Para>

</Sect2>

<Sect2 id="my-malloc">
<Title>my&lowbar;malloc °ú my&lowbar;free ÀÇ »ç¿ë</Title>

<Para>
malloc°ú realloc À» ÃÖ´ëÇÑ »ç¿ëÇÏÁö ¸»°í, <Emphasis remap="bf">new</Emphasis> ¿Í
<Emphasis remap="bf"><XRef LinkEnd="zap">(delete)</Emphasis>À» »ç¿ëÇضó.
±×·¯³ª ¶§·Î´Â C++¿¡¼­ C ½ºÅ¸ÀÏÀÇ ¸Þ¸ð¸® ÇÒ´çÀ» »ç¿ëÇØ¾ß ÇÒ ÇÊ¿äµµ ÀÖ´Ù.
ÀÌ ¶§´Â <Emphasis remap="bf">my&lowbar;malloc()</Emphasis> ,
<Emphasis remap="bf">my&lowbar;realloc()</Emphasis> ,
<Emphasis remap="bf">my&lowbar;free()</Emphasis> À» »ç¿ëÇضó.
ÀÌ ÇÔ¼öµéÀº ÀûÀýÇÑ ÇÒ´ç°ú ÃʱâÈ­¸¦ ÇØÁÖ°í, ¸Þ¸ð¸® ¹®Á¦¸¦ ¿¹¹æÇØÁØ´Ù.
¶ÇÇÑ ÀÌ ÇÔ¼öµéÀº DEBUG¸ðµå¿¡¼­ ¸Þ¸ð¸® ÇÒ´çÀ» ÃßÀûÇØÁÖ°í, ÇÁ·Î±×·¥ ½ÇÇà
ÀüÈÄ¿¡ ÃÑ ¸Þ¸ð¸® »ç¿ë·®À» Ç¥½ÃÇØÁØ´Ù. ÀÌ´Â ¸Þ¸ð¸® ¸¯ÀÌ ÀÖ´ÂÁö¸¦
¾Ë·ÁÁÙ °ÍÀÌ´Ù.
</Para>

<Para>
my&lowbar;malloc °ú my&lowbar;reallocÀº ´ÙÀ½°ú °°ÀÌ Á¤ÀǵǾú´Ù.
ÀÌ´Â ¾à°£ÀÇ ¸Þ¸ð¸®¸¦ ´õ ÇÒ´çÇؼ­ (SAFE&lowbar;MEM = 5) ÃʱâÈ­½ÃÅ°°í,
¸Þ¸ð¸®¸¦ ÇÒ´çÇÒ ¼ö ¾øÀ¸¸é ÇÁ·Î±×·¥À» Á¾·áÇÑ´Ù.
'call&lowbar;check(), remove&lowbar;ptr()' ÇÔ¼ö´Â DEBUG&lowbar;MEM °¡ makefile¿¡¼­
((void)0) (ÀÌ´Â NULLÀ» ÀǹÌÇÑ´Ù)À¸·Î ÁöÁ¤µÇ¾îÀÖÀ» ¶§¿¡¸¸ ÀÛµ¿ÇÑ´Ù.
ÀÌ´Â ÃÑ ¸Þ¸ð¸® »ç¿ë·®À» ÃßÀûÇÒ ¼ö ÀÖ°Ô ÇØÁØ´Ù.
</Para>

<Para>

<ProgramListing>
void *local_my_malloc(size_t size, char fname[], int lineno) 
{
	size_t  tmpii = size + SAFE_MEM;
	void *aa = NULL;
	aa = (void *) malloc(tmpii);
	if (aa == NULL)
		raise_error_exit(MALLOC, VOID_TYPE, fname, lineno);
	memset(aa, 0, tmpii);
	call_check(aa, tmpii, fname, lineno);
	return aa;
}

char *local_my_realloc(char *aa, size_t size, char fname[], int lineno)
{
	remove_ptr(aa, fname, lineno);
	unsigned long tmpjj = 0;
	if (aa) // aa !=  NULL
		tmpjj = strlen(aa);
	unsigned long tmpqq = size + SAFE_MEM;
	size_t  tmpii = sizeof (char) * (tmpqq);
	aa = (char *) realloc(aa, tmpii);
	if (aa == NULL)
		raise_error_exit(REALLOC, CHAR_TYPE, fname, lineno);

	// do not memset memset(aa, 0, tmpii);
	aa[tmpqq-1] = 0;
	unsigned long kk = tmpjj;
	if (tmpjj &#62; tmpqq)
		kk = tmpqq;
	for ( ; kk &#60; tmpqq; kk++)
		aa[kk] = 0;
	call_check(aa, tmpii, fname, lineno);
	return aa;
}
</ProgramListing>

my&lowbar;malloc ÀÇ ¸ðµç ±¸ÇöÀ» º¸·Á¸é 
<XRef LinkEnd="Appendix-A">
¿¡¼­ 
<XRef LinkEnd="Appendix-A">
ÀÇ Çì´õÆÄÀÏÀ» º¸¸é µÈ´Ù.
</Para>

<Para>
my&lowbar;malloc °ú my&lowbar;free ¸¦ ¾²´Â ¿¹´Â ´ÙÀ½°ú °°´Ù.
<ProgramListing>
	char 	*aa;
	int 	*bb;
	float	*cc;
	aa = (char *) my_malloc(sizeof(char)* 214);
	bb = (int *) my_malloc(sizeof(int) * 10);
	cc = (float *) my_malloc(sizeof(int) * 20);

	aa = my_realloc(aa, sizeof(char) * 34);
	bb = my_realloc(bb, sizeof(int) * 14);
	cc = my_realloc(cc, sizeof(float) * 10);
</ProgramListing>
my&lowbar;realloc ¿¡¼­ data typeÀ» cast ÇÒ ÇÊ¿ä°¡ ¾ø´Â °Í¿¡ ÁÖÀÇÇضó.
ÀÌ´Â ÀÎÀÚ·Î ¹ÞÀº º¯¼öÀÇ Å¸ÀÔ¿¡ ¸ÂÃç¼­ ¸®ÅÏ°ªÀ» º¸³»±â ¶§¹®ÀÌ´Ù.
The my&lowbar;realloc ÇÔ¼ö´Â char *, int *, float * ŸÀÔÀ¸·Î ¿À¹ö·Îµù
µÇ¾îÀÖ´Ù.
</Para>

</Sect2>

<Sect2 id="garbage">
<Title>C++ ¿¡¼­ÀÇ °¡¹ÙÁö ÄÝ·ºÅÍ</Title>

<Para>
C/C++¿¡¼­ °¡ºñÁö ÄÝ·º¼ÇÀº Ç¥ÁØ¿¡¼­ Áö¿øµÇÁö ¾Ê°í, µû¶ó¼­ ¸Þ¸ð¸®¸¦ Á÷Á¢
ÇÒ´ç, ÇØÁ¦ÇÏ´Â °ÍÀÌ ¾î·Æ°í º¹ÀâÇÏ¸ç ¿¡·¯¸¦ ³»±â ½±´Ù.
<Emphasis remap="bf">°¡ºñÁö ÄÝ·º¼Ç(GC:Garbage Collection)</Emphasis> Àº
±¸ÇöÇÏ´Â ¹æ¹ýÀÌ ¿©·¯°¡Áö°¡ ÀÖ°í, °¢ ÇÁ·Î±×·¥¸¶´Ù Àû¿ëµÉ ¼ö ÀÖ´Â ¹æ¹ýÀÌ
´Ù¸£±â ¶§¹®¿¡ C++ Ç¥ÁØÀÇ ÀϺΰ¡ µÉ ¼ö ¾ø¾ú´Ù.
Àü»êÇÐÀÚµéÀº ¸¹Àº GC ¾Ë°í¸®ÁòÀ» °³¹ßÇß°í, À̵éÀº °¢ ¹®Á¦ºÐ¾ß¿¡¼­¸¸
Àû¿ëµÉ ¼ö ÀÖ´Â °ÍµéÀ̾ú´Ù.
Áï, ¸ðµç ÀϹÝÀûÀÎ ¹®Á¦¿¡ Àû¿ëµÉ ¼ö ÀÖ´Â ÇϳªÀÇ ¹ü¿ë GC¾Ë°í¸®ÁòÀº ¾ø´Ù.
µû¶ó¼­ GC´Â C++ Ç¥ÁØ¿¡ µé¾î°¡Áö ¸øÇß´Ù. µû¶ó¼­ ¾ðÁ¦³ª ÇÏ´Â ÀÏ¿¡ ¸Â´Â
C++ ¶óÀ̺귯¸®¸¦ ¸¹Àº ¶óÀ̺귯¸®µé Áß¿¡¼­ °í¸¦ ¼ö ÀÖ´Ù.
</Para>

<Para>
´ÙÀ½ C++
<ULink
URL="http://www.xanalys.com/software_tools/mm/glossary/g.html#garbage.collection"
>°¡ºñÁö ÄÝ·º¼Ç(Garbage Collection)</ULink
>
»çÀÌÆ®¿Í 
<ULink
URL="http://www.xanalys.com/software_tools/mm"
>¸Þ¸ð¸® °ü¸®</ULink
> »çÀÌÆ®¸¦ °¡º¸¾Æ¶ó.
</Para>

</Sect2>

</Sect1>

<Sect1 id="pointers">
<Title>Æ÷ÀÎÅÍ°¡ ¹®Á¦ÀÌ´Ù</Title>

<Para>
Æ÷ÀÎÅÍ´Â ÀϹÝÀûÀÎ ÇÁ·Î±×·¥¿¡¼­ ²À ÇÊ¿äÇÑ °ÍÀº ¾Æ´Ï´Ù.
Java¿Í °°Àº Çö´ë ¾ð¾î¿¡¼­´Â Æ÷ÀÎÅÍ°¡ ¾ø´Ù (Java´Â ³»ºÎÀûÀ¸·Î¸¸
Æ÷ÀÎÅ͸¦ »ç¿ëÇÑ´Ù).
Æ÷ÀÎÅÍ´Â ÇÁ·Î±×·¥À» ¾îÁö·´°í Àбâ Èûµé°Ô ¸¸µç´Ù.
</Para>

<Para>
ÃÖ´ëÇÑ Æ÷ÀÎÅÍÀÇ »ç¿ëÀ» ÇÇÇÏ°í, ´ë½Å ·¹ÆÛ·±½º¸¦ »ç¿ëÇضó.
Æ÷ÀÎÅÍ´Â Á¤¸» ¹®Á¦°¡ ¸¹°í, Æ÷ÀÎÅÍ ¾øÀÌ ÇÁ·Î±×·¥À» ¾²´Â °Ô °¡´ÉÇÏ´Ù.
<Emphasis remap="it"> Æ÷ÀÎÅÍ´Â ·¹ÆÛ·±½º¸¦ ¾µ ¼ö ¾ø´Â °÷¿¡¼­¸¸ ½á¾ßÇÑ´Ù.  </Emphasis>
</Para>

<Para>
<Emphasis remap="bf">·¹ÆÛ·±½º</Emphasis>
´Â º°Äª(alias)ÀÌ´Ù. ·¹ÆÛ·±½º¸¦ ¸¸µé¸é, ÀÌ´Â ´Ù¸¥ °´Ã¼(ȤÀº ´ë»ó)¿¡ ´Ù¸¥ À̸§À»
ÁÖ´Â °ÍÀÌ´Ù. ±× ¼ø°£ºÎÅÍ ·¹ÆÛ·±½º´Â ´ë»óÀÇ ´Ù¸¥ À̸§À¸·Î¼­ µ¹¾Æ°¡°í,
·¹ÆÛ·±½º¿¡ ÇàÇÏ´Â ¸ðµç ¿¬»êÀÌ ±× ´ë»ó¿¡ ½ÇÁ¦·Î Àû¿ëµÈ´Ù.
</Para>

<Para>
<Emphasis remap="bf">·¹ÆÛ·±½ºÀÇ ¹®¹ý :</Emphasis>
ŸÀÔÀ» ¼±¾ðÇÒ ¶§, µÚ¿¡ ·¹ÆÛ·±½º ¿¬»êÀÚ (&#38;) ¸¦ ºÙÀÓÀ¸·Î½á ·¹ÆÛ·±½º¸¦ ¼±¾ðÇÒ ¼ö ÀÖ´Ù.
·¹ÆÛ·±½º´Â <Emphasis remap="bf">¹Ýµå½Ã</Emphasis> ¸¸µé¾î Áú ¶§ ÃʱâÈ­ µÇ¾î¾ß ÇÑ´Ù.
´ÙÀ½ÀÇ ¿¹¸¦ º¸ÀÚ -
<ProgramListing>
	int	weight;
	int	&#38; rweight = weight;

	DOG	aa;
	DOG	&#38; rDogRef = aa;
</ProgramListing>

</Para>

<Para>
·¹ÆÛ·±½º¸¦ »ç¿ëÇÒ ¶§ <Emphasis remap="it"> Áöų °Í</Emphasis> -

<ItemizedList>
<ListItem>

<Para>
°´Ã¼¿¡ ´ëÇÑ ´Ù¸¥ À̸§À» ÁÖ°íÀÚ ÇÒ ¶§ ·¹ÆÛ·±½º¸¦ »ç¿ëÇضó.
</Para>
</ListItem>
<ListItem>

<Para>
¸ðµç ·¹ÆÛ·±½º´Â ÃʱâÈ­µÇ¾î¾ß ÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
ÇÁ·Î±×·¥ÀÇ ³ôÀº È¿À²°ú ÆÛÆ÷¸Õ½º¸¦ À§ÇØ ·¹ÆÛ·±½º¸¦ »ç¿ëÇضó
</Para>
</ListItem>
<ListItem>

<Para>
·¹ÆÛ·±½º¿Í Æ÷ÀÎÅ͸¦ º¸È£Çϱâ À§ÇØ °¡´ÉÇÑ°æ¿ì¸é ¾ðÁ¦³ª
<Emphasis remap="bf">const</Emphasis>¸¦ »ç¿ëÇضó.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
·¹ÆÛ·±½º¸¦ »ç¿ëÇÒ ¶§ <Emphasis remap="it">ÇÏÁö ¸»¾Æ¾ß ÇÒ °Í</Emphasis> -

<ItemizedList>
<ListItem>

<Para>
<Emphasis remap="bf">Áß¿ä : </Emphasis> NULLÀÎ °´Ã¼¿¡ ´ëÇØ ·¹ÆÛ·±½º¸¦ ¾²Áö ¸»¾Æ¶ó.
</Para>
</ListItem>
<ListItem>

<Para>
Æ÷ÀÎÅÍÀÇ ÁÖ¼Ò¸¦ ³ªÅ¸³»´Â &amp;¿Í ·¹ÆÛ·±½º ¿¬»êÀÚ¸¦ Çò°¥¸®Áö ¸¶¶ó.
·¹ÆÛ·±½º ¿¬»êÀÚ´Â ¿ÀÁ÷ ¼±¾ðºÎ (À§¿¡ ³ª¿ÍÀÖ´Â ·¹ÆÛ·±½º »ç¿ë¹ý ÂüÁ¶) ¿¡¼­¸¸ ¾²ÀδÙ.
</Para>
</ListItem>
<ListItem>

<Para>
·¹ÆÛ·±½º¿¡ »õ·Î °ªÀ» ÁöÁ¤ÇÏ·Á(Áï, º¯°æÇÏ·Á) ÇÏÁö ¸¶¶ó.
</Para>
</ListItem>
<ListItem>

<Para>
·¹ÆÛ·±½º¸¦ ¾µ ¼ö ÀÖ´Ù¸é Æ÷ÀÎÅ͸¦ ¾²Áö ¸¶¶ó.
</Para>
</ListItem>
<ListItem>

<Para>
Áö¿ªº¯¼ö¿¡ ´ëÇÑ ·¹ÆÛ·±½º¸¦ ¸®ÅÏÇÏÁö ¸¶¶ó.
</Para>
</ListItem>
<ListItem>

<Para>
·¹ÆÛ·±½º°¡ ½ºÄÚÇÁ°¡ ¹þ¾î³­ º¯¼ö¸¦ °¡¸®Å°µµ·Ï ÇÏÁö ¸¶¶ó.
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect1>

<Sect1>
<Title>µð¹ö±ë</Title>

<Para>
Á¤È®ÇÑ ¹ö±×ÀÇ ¿øÀÎÀ» ¾Ë¾Æ³»´Â °ÍÀº ²Ï³ª ¼º°¡½Å ÀÏÀÌÁö¸¸,
¿©±â¿¡µµ ¸î°¡Áö Å×Å©´ÐÀÌ ÀÖ´Ù.

<ItemizedList>
<ListItem>

<Para>
Ç¥ÁØÃâ·ÂÀ¸·Î ÇÁ¸°Æ®ÇÏ¿© - ÇÁ·Î±×·¥ÀÌ °£´ÜÇÑ °æ¿ì, ¸î¸î º¯¼öµéÀÇ °ªÀ»
ÇÁ¸°Æ®Çغ¸°í, ¾î¶² °ªÀÎÁö º»´Ù - ¹«¾ùÀÌ À߸øµÇ¾ú´ÂÁö ã±â
</Para>
</ListItem>
<ListItem>

<Para>
µð¹ö°Å¸¦ ÀÌ¿ëÇϱâ. µð¹ö°Å´Â breakpoint¸¦ ¼³Á¤ÇÏ°í, ½ÇÇ൵Áß¿¡ Äڵ带 
ÃßÀûÇغ¼ ¼ö ÀÖµµ·Ï ÇØÁØ´Ù. ´ëºÎºÐÀÇ IDE´Â µð¹ö°Å°¡ °°ÀÌ ÀÖ´Ù.
GNU ½Ã½ºÅÛÀÇ °æ¿ì, gdb°¡ ÀÖ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
ÄÄÆÄÀÏ·¯¿¡¼­ Áö¿øÇÏ´Â ¿É¼ÇµéÀ» »ç¿ëÇÏ¿© º¸´Ù ¸¹Àº °æ°í(warning)À» º¼ ¼ö ÀÖµµ·Ï
Çضó. ¿¹¸¦µé¾î g++ÀÇ °æ¿ì, -Wall ¿É¼ÇÀ» »ç¿ëÇضó.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
µð¹ö±ë¿¡ µµ¿òÀÌ µÇ´Â »çÀÌÆ® :

<ItemizedList>
<ListItem>

<Para>
 Unix ȯ°æ¿¡¼­ C, C++ µð¹ö±ëÇϱâ
<ULink
URL="http://www.liacs.nl/~jdassen/onderwijs/stuva/debug/debug.html"
>http://www.liacs.nl/~jdassen/onderwijs/stuva/debug/debug.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 MPatrol - À¯¿ëÇÑ ¸Þ¸ð¸® µð¹ö±ë Åø : <ULink
URL="http://www.cbmamiga.demon.co.uk/mpatrol"
>http://www.cbmamiga.demon.co.uk/mpatrol</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 NJAMD - ¿ª½Ã À¯¿ëÇÑ ¸Þ¸ð¸® µð¹ö±ë Åø : <ULink
URL="http://sourceforge.net/projects/njamd/"
>http://sourceforge.net/projects/njamd/</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 LeakTracer - ¸Þ¸ð¸® ¸¯À» ã´Â °£´ÜÇϸ鼭µµ À¯¿ëÇÑ Åø : <ULink
URL="http://www.andreasen.org/LeakTracer/"
>http://www.andreasen.org/LeakTracer/</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Sect2>
<Title>µð¹ö±ë ÆÄÀÏ</Title>

<Para>
C++À̳ª C ÇÁ·Î±×·¥À» µð¹ö±ëÇÏ·Á¸é <XRef LinkEnd="Appendix-A"> ÀÇ ÆÄÀÏÀ» ÀÎŬ·çµåÇÏ°í,
'Makefile'¿¡ DEBUG&lowbar;STR, DEBUG&lowbar;PRT , DEBUG&&lowbar;MEMÀ» µðÆÄÀÎ Çؼ­
debug.h ÀÇ ÇÔ¼öµé·Î ÃßÀûÇÒ ¼ö ÀÖµµ·Ï ÇÑ´Ù.
'-DDEBUG&lowbar;STR' µîÀ» ¾ø¾Ù ¶§, µð¹ö±ë ÇÔ¼öµéÀº ((void)0) (NULLÀ» ÀǹÌ)À¸·Î ¼¼ÆõÉ
°ÍÀÌ´Ù. µû¶ó¼­ ÃÖÁ¾ °á°ú¹°¿¡´Â ¾Æ¹«·± ¿µÇâÀ» ÁÖÁö ¾Ê´Â´Ù.
ÀÌ µð¹ö±ë ÇÔ¼öµéÀº ÇÁ·Î±×·¥¿¡ ´Ù¾çÇÏ°Ô Àû¿ëµÉ ¼ö ÀÖÀ» °ÍÀÌ°í, °á°ú¹°ÀÇ Å©±â¸¦
Áõ°¡½ÃÅ°Áö´Â ¾ÊÀ» °ÍÀÌ´Ù.
</Para>

<Para>
debug ·çƾÀÇ ±¸ÇöÀ» À§Çؼ­´Â <XRef LinkEnd="Appendix-A"> ¸¦ ÂüÁ¶Çضó.
</Para>

<Para>
¶ÇÇÑ, <XRef LinkEnd="Appendix-A"> ¿¡¼­ debug.h ¿Í µð¹ö±ë ÇÔ¼öµéÀ»
ÀÌ¿ëÇÑ ¿¹Á¦ ÇÁ·Î±×·¥À» º¸¾Æ¶ó.
</Para>

<Para>
<XRef LinkEnd="Appendix-A"> ÀÇ ¿¹¸¦ º¸¶ó.
</Para>

</Sect2>

</Sect1>

<Sect1 id="ide-and-editors">
<Title>C++À» À§ÇÑ IDE(Integrated Development Enviroment)¿Í ¿¡µðÅÍ</Title>

<Para>
C++·Î ÇÁ·Î±×·¡¹ÖÀ» ÇÒ ¶§, ¿¡µðÅͳª IDE¸¦ »ç¿ëÇÏ´Â °ÍÀÌ ÁÁ´Ù. ´ëºÎºÐÀÇ
ÇÁ·Î±×·¡¸Ó´Â ÀÚ½ÅÀÌ ÁÁ¾ÆÇÏ´Â °ÍµéÀ» °®°Ô ¸¶·ÃÀÌ°í, ¾î¶² °ÍÀÌ ÁÁÀºÁö¿¡
´ëÇØ °ÅÀÇ Á¾±³ÀûÀÎ ¹ÏÀ½À» °®´Â´Ù.
</Para>

<Para>
³Ê´Â ³»Àå ¿¡µðÅÍ¿Í ÄÄÆÄÀÏ·¯, ¹®¼­µé°ú ±âŸ µîµîÀ¸·Î ¸ðµÎ Æ÷ÇÔÇÏ´Â 
IDE (Intergrated Development Environment : ÅëÇÕ °³¹ßȯ°æ)¸¦ »ç¿ëÇÒ ¼öµµ ÀÖ´Ù.
¶Ç´Â ¸î¸î »ç¶÷µéÀÌ ±×·¯´Â °Í ó·³, ´Ü¼øÇÑ ¿¡µðÅ͸¸À» »ç¿ëÇÒ ¼öµµ ÀÖ´Ù.
</Para>

<Sect2>
<Title>IDE µé</Title>

<Para>
C++ °³¹ßÀ» À§ÇÑ ´ÙÀ½°ú °°Àº IDE (Integrated Development Environment) toolÀÌ ÀÖ´Ù.

<ItemizedList>
<ListItem>

<Para>
 ÃÖ°í·Î ÀÎÁ¤¹Þ´Â Dev-C++Àº win32¿Í Linux¿¡¼­ µ¿ÀÛÇÏ´Â ¸¸´É IDEÀÌ´Ù.
 ÀÌ´Â GCC¿Í Mingw, CygwinÀ» ÄÄÆÄÀÏ·¯¿Í ¶óÀ̺귯¸®·Î »ç¿ëÇÑ´Ù.
ÀÌ´Â <ULink
URL="http://www.bloodshed.net/devcpp.html"
>http://www.bloodshed.net/devcpp.html</ULink
> 
¿Í <ULink
URL="http://sourceforge.net/projects/dev-cpp"
>¹Ì·¯ »çÀÌÆ®</ULink
>
¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 KDE KDevelop <ULink
URL="http://www.kdevelop.org"
>Kdevelop</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Blatura site <ULink
URL="http://home.xnet.com/~blatura/linapp6.html#tools"
>C++ Tools</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Amulet <ULink
URL="http://www.cs.cmu.edu/afs/cs.cmu.edu/project/amulet/www"
>Amulet</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 App Dev suite <ULink
URL="http://www.angoss.com/sw/home.htm"
>Angoss</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Make replacement <ULink
URL="http://wsd.iitb.fhg.de/~kir/brashome/"
>Brass</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 S/W product metrics <ULink
URL="http://www.fste.ac.cowan.edu.au/~tlittlef"
>CCC</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Project mgmt, edit, compile, debug <ULink
URL="http://www.codeforge.com"
>C-Forge</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Dev environment <ULink
URL="http://www.cco.caltech.edu/~jafl/jx/progs.html"
>Code Crusader</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Graphic gdb <ULink
URL="http://www.cco.caltech.edu/~glenn/medic/"
>Code Medic</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Code analysis <ULink
URL="http://www.parasoft.com/wizard/index.html"
>CodeWizard</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Gen HTML, LaTex for C++ cod <ULink
URL="http://www.zib.de/Visual/software/doc++/index.html"
>Doc C++</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 GUI toolkit openGL <ULink
URL="http://fltk.easysw.com/"
>Ftk</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 C++ and Java IDE <ULink
URL="http://www.genlogic.com"
>GLG IDE</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 HP IDE <ULink
URL="http://www.hp-eloquence.com/sales/info.html"
>HP Eloquence</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 IDE C++, Java, Pascal <ULink
URL="http://www.tu-chemnitz.de/~sho/rho/rhide.html"
>RHIDE</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 IDE for C++, Java <ULink
URL="http://www.takefive.com/"
>SNiff</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 IDE for C++, Java <ULink
URL="http://www.softwarebuero.de/wipeout-eng.html"
>Wipeout</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 X-based dev env <ULink
URL="http://www.rpi.edu/~payned/xwpe"
>XWPE</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

<Sect2>
<Title>¿¡µðÅÍ</Title>

<Para>
IDEÀÇ ¹®Á¦Á¡Àº ÀÌ¿¡ °°ÀÌ µé¾îÀÖ´Â ¿¡µðÅÍÀÇ ±â´ÉÀÌ ¸Å¿ì ¶³¾îÁø´Ù´Â °ÍÀÌ´Ù.
µû¶ó¼­ ¸¹Àº »ç¶÷µéÀº ÆÄ¿öÇ®ÇÑ ¿¡µðÅ͸¦ ¿øÇß°í, ÄÄÆÄÀÏ·¯¿Í ÇÔ²² »ç¿ëÇÑ´Ù.
</Para>

<Para>
ÆÄ¿öÇ®ÇÑ ¿¡µðÅͷδ vim°ú emacs¸¦ µé ¼ö ÀÖ´Ù.
µÑ ´Ù ¸ðµÎ ¸¹Àº Ç÷§Æû¿¡¼­ µ¿ÀÛÇÏ°í, È¿À²¼ºÀ» ³ô¿©ÁÙ ½ÅÅýº ÇÏÀ̶óÀÌÆÃÀ»
ºñ·ÔÇÑ ¿©·¯°¡Áö ±â´ÉµéÀ» °®°í ÀÖ´Ù.
</Para>

<Para>
´Ù¸¥ °ÍÀ¸·Î´Â UltraEdit(win32 only) ¿Í EditPlus(win32 only)°¡ ÀÖ´Ù.
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
Vim »çÀÌÆ® <ULink
URL="http://vim.sourceforge.net/"
>http://vim.sourceforge.net/</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Vim HOWTO <ULink
URL="http://www.linuxdoc.org/LDP/HOWTO/Vim-HOWTO.html"
>http://www.linuxdoc.org/LDP/HOWTO/Vim-HOWTO.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Emacs »çÀÌÆ® <ULink
URL="http://www.gnu.org/software/emacs/"
>http://www.gnu.org/software/emacs/</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 EditPlus for Windows »çÀÌÆ® <ULink
URL="http://www.editplus.com/"
>http://www.editplus.com/</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 UltraEdit for Windows »çÀÌÆ® <ULink
URL="http://www.ultraedit.com/"
>http://www.ultraedit.com/</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

<Sect2>
<Title>´Ù¸¥ Âü°íÇÒ¸¸ÇÑ ³»¿ë</Title>

<Para>

<ItemizedList>
<ListItem>

<Para>
 C++ Beautifier HOWTO <ULink
URL="http://www.linuxdoc.org/LDP/HOWTO/C-C++Beautifier-HOWTO.html"
>http://www.linuxdoc.org/LDP/HOWTO/C-C++Beautifier-HOWTO.html</ULink
>
( <ULink URL="http://kldp.org/HOWTO/html/C-C++Beautifier/C-C++Beautifier-HOWTO.html"
> Çѱ۹ø¿ª </ULink> )
</Para>
</ListItem>
<ListItem>

<Para>
 C++ ÇÁ·Î±×·¥À» À§ÇÑ ¹öÀü°ü¸® ½Ã½ºÅÛ HOWTO (CVS HOWTO) <ULink
URL="http://www.linuxdoc.org/LDP/HOWTO/CVS-HOWTO.html"
>http://www.linuxdoc.org/LDP/HOWTO/CVS-HOWTO.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 À¯¿ëÇÑ ¸®´ª½º »çÀÌÆ® <ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>http://www.milkywaygalaxy.freeservers.com</ULink
> 
¿Í ¹Ì·¯ »çÀÌÆ® -
<ULink
URL="http://www.angelfire.com/country/aldev0"
>angelfire</ULink
>,
<ULink
URL="http://www.geocities.com/alavoor/index.html"
>geocities</ULink
>,
<ULink
URL="http://aldev0.virtualave.net"
>virtualave</ULink
>,
<ULink
URL="http://aldev0.50megs.com"
>50megs</ULink
>,
<ULink
URL="http://members.theglobe.com/aldev1/index.html"
>theglobe</ULink
>,
<ULink
URL="http://members.nbci.com/alavoor"
>NBCi</ULink
>,
<ULink
URL="http://aldev.terrashare.com"
>Terrashare</ULink
>,
<ULink
URL="http://members.fortunecity.com/aldev"
>Fortunecity</ULink
>,
<ULink
URL="http://aldev.freewebsites.com"
>Freewebsites</ULink
>,
<ULink
URL="http://members.tripod.lycos.com/aldev"
>Tripod</ULink
>,
<ULink
URL="http://members.spree.com/technology/aldev"
>Spree</ULink
>,
<ULink
URL="http://www.escalix.com/freepage/aldev"
>Escalix</ULink
>,
<ULink
URL="http://www.httpcity.com/aldev/index.html"
>Httpcity</ULink
>,
<ULink
URL="http://aldev.freeservers.com"
>Freeservers</ULink
>.
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

</Sect1>

<Sect1 id="onlinebooks">
<Title>C++ Online ÅؽºÆ®¿Í ¹®¼­µé</Title>

<Para>
C++¿¡ ´ëÇÑ <Emphasis remap="bf">¼ö¹é¸¸ÀÇ</Emphasis> ¿Â¶óÀÎ ¹®¼­/ÅؽºÆ®/Âü°íÀÚ·á °¡ÀÌµå µîÀÌ Á¸ÀçÇÑ´Ù. ÀÌ´Â C++ÀÌ ¸Å¿ì ¿À·§µ¿¾È ¾²ÀÌ°í Àֱ⠶§¹®ÀÌ´Ù. ¾Æ¸¶
Google, Yahoo, Lycos, Excite µîÀÇ ÀÎÅÍ³Ý °Ë»ö¿£ÁøÀ» »ç¿ëÇÏ¸é µµ¿òÀÌ µÉ °ÍÀÌ´Ù.
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
 "C++ Annotations" ¿Â¶óÀÎ ºÏ »çÀÌÆ®:<ULink
URL="http://www.icce.rug.nl/documents/cplusplus"
>Annotations</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
"Teach Yourself C++ in 21 days" ¿Â¶óÀÎ »çÀÌÆ® <ULink
URL="http://guides.oernii.sk/c++/index.htm"
>Teach C++</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ Textbook by Bruce Eckel <ULink
URL="http://www.mindview.net/Books/DownloadSites"
>Thinking in C++</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 C++ Open books: <ULink
URL="http://www.softpanorama.org/Bookshelf/cpp.shtml"
>Panorama</ULink
>
Open Books¸¦ Ŭ¸¯ÇÏ¸é µÈ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 "Who's Afraid of C++?" online textbook: <ULink
URL="http://www.steveheller.com/whos"
>Steveheller</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 "Introduction to Object Oriented Programming" an ebook <ULink
URL="http://www.gnacademy.org/uu-gna/text/cc/Tutorial/tutorial.html"
>C++ OOP</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 C++ in Hypertext <ULink
URL="http://cs.nmhu.edu/personal/curtis/cs1htmlfiles/Cs1text.htm"
>C++ Hypertext</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 Object Oriented Systems <ULink
URL="http://www.javaworld.com/javaworld/jw-07-1999/jw-07-toolbox_p.html"
>OOP article</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
C++ Language Reference from cplusplus.com <ULink
URL="http://www.cplusplus.com/ref"
>http://www.cplusplus.com/ref</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
C++ Documentation from cplusplus.com <ULink
URL="http://www.cplusplus.com"
>http://www.cplusplus.com</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
Common C++ Pitfalls to be avoided <ULink
URL="http://www.horstmann.com/cpp/pitfalls.html"
>http://www.horstmann.com/cpp/pitfalls.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
Porting C++ to Java <ULink
URL="http://www.ibm.com/java/education/portingc"
>PortingC</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C/C++ Journals <ULink
URL="http://www.math.utah.edu/pub/tex/bib/toc/cccuj.html"
>UtahJournals</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
Yahoo C++ category site <ULink
URL="http://dir.yahoo.com/Computers_and_Internet/Programming_Languages/C_and_C__/C__"
>CCyahoo</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C Library Reference Guide<ULink
URL="http://www.acm.uiuc.edu/webmonkeys/book/c_guide/index.html"
>c_guide</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Online textbooks C++/Java <ULink
URL="http://www.informit.com/free_library"
>FreeLib</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 "C++ In Action" by Bartosz Milewski at <ULink
URL="http://www.relisoft.com/book/index.htm"
>http://www.relisoft.com/book/index.htm</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
¾î¶»°Ô Äڵ带 ¾²¸é ¾ÈµÇ´Â°¡¿¡ ´ëÇÑ Àç¹ÌÀÖ´Â ¿¹Á¦.
 "How to write unmaintainable code" 
 <ULink
URL="http://mindprod.com/unmain.html"
>http://mindprod.com/unmain.html</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
C++ ÇÁ·Î±×·¡¸Ó¸¦ À§ÇØ À¯¿ëÇÒ Java Ã¥µé :

<ItemizedList>
<ListItem>

<Para>
 Great Web reference site <ULink
URL="http://www.webreference.com/index2.html"
>WebRef</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Many Java books <ULink
URL="http://freewarejava.com/books/index.shtml"
>JBooks</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Intro to Java V3.0 <ULink
URL="http://math.hws.edu/javanotes"
>JavaNotes</ULink
>
mirror <ULink
URL="http://matrix.mvhs.fuhsd.org/~deruiter/javanotes3/contents.html"
>JavaNotes</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Web Library: <ULink
URL="http://www.itlibrary.com"
>http://www.itlibrary.com</ULink
> 
</Para>
</ListItem>
<ListItem>

<Para>
 Thinking in Java: <ULink
URL="http://www.mindview.net/Books/DownloadSites"
>Thinking Java</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 John Hopkins Univ - Java resources <ULink
URL="http://www.apl.jhu.edu/~hall/java"
>Hall</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 online Java tutorial <ULink
URL="http://chortle.ccsu.ctstateu.edu/cs151/cs151java.html"
>Chortle</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Practical guide for Java <ULink
URL="http://java.sun.com/docs/books/tutorial/index.html"
>SunBooks</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Java <ULink
URL="http://journals.ecs.soton.ac.uk/java/tutorial/TOC.html"
>Soton</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Sect2>
<Title>C++ »çÀÌÆ®µé</Title>

<Para>
´ÙÀ½ÀÇ C++ »çÀÌÆ®µéÀ» ¹æ¹®Çغ¸¶ó :-
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
C++ STL basic_string class ¹®¼­ -
<ULink
URL="http://www.sgi.com/tech/stl/basic_string.html"
>http://www.sgi.com/tech/stl/basic_string.html</ULink
>.
</Para>
</ListItem>
<ListItem>
<Para>
 <XRef LinkEnd="stlref"> ¼½¼ÇÀ» Âü°íÇضó.
</Para>
</ListItem>
<ListItem>

<Para>
C++ Crash-proof site  <ULink
URL="http://www.troubleshooters.com/codecorn/crashprf.htm"
>http://www.troubleshooters.com/codecorn/crashprf.htm</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
C++ Memory site<ULink
URL="http://www.troubleshooters.com/codecorn/memleak.htm"
>http://www.troubleshooters.com/codecorn/memleak.htm</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
GNU Main site <ULink
URL="http://www.gnu.org"
>http://www.gnu.org</ULink
> and 
gnu C++ site at <ULink
URL="http://gcc.gnu.org"
>http://gcc.gnu.org</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
AS University C++ Standard String class <ULink
URL="http://www.eas.asu.edu/~cse200/outline"
>http://www.eas.asu.edu/~cse200/outline</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
Java JString for C++ <ULink
URL="http://www.mike95.com/c_plusplus/classes/JString/JString_cpp.asp"
>http://www.mike95.com/c_plusplus/classes/JString/JString_cpp.asp</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ Language Reference <ULink
URL="http://www.msoe.edu/~tritt/cpplang.html"
>http://www.msoe.edu/~tritt/cpplang.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ Program examples and samples <ULink
URL="http://www.msoe.edu/~tritt/cpp/examples.html"
>http://www.msoe.edu/~tritt/cpp/examples.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
Neil's C++ stuff <ULink
URL="http://www.cyclone7.com/cpp"
>http://www.cyclone7.com/cpp</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
ÀÎÅͳݿ¡´Â ¾î¸¶¾î¸¶ÇÏ°Ô ¸¹Àº C++ ¹®¼­µéÀÌ ÀÖ´Ù.
Google, Yahoo, Lycos, Infoseek, Excite °°Àº °Ë»ö¿£Áø¿¡ °¡¼­
´ÙÀ½ÀÇ Å°¿öµå¸¦ ³Ö¾îº¸¾Æ¶ó.
<Emphasis remap="bf">'C++ tutorials'</Emphasis> 
<Emphasis remap="bf">'C++ references'</Emphasis> 
<Emphasis remap="bf">'C++ books'</Emphasis>
<Emphasis remap="it">Advanced</Emphasis> ¸¦ Ŭ¸¯Çؼ­
<Emphasis remap="it">search by exact phrase</Emphasis>¸¦ ¼±ÅÃÇÔÀ¸·Î½á
´õ Á¤È®ÇÑ °á°ú¸¦ ¾òÀ» ¼ö ÀÖÀ» °ÍÀÌ´Ù.
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
 <ULink
URL="http://www.google.com"
>http://www.google.com</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 <ULink
URL="http://www.yahoo.com"
>http://www.yahoo.com</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 <ULink
URL="http://www.lycos.com"
>http://www.lycos.com</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 <ULink
URL="http://www.infoseek.com"
>http://www.infoseek.com</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 <ULink
URL="http://www.excite.com"
>http://www.excite.com</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 <ULink
URL="http://www.mamma.com"
>http://www.mamma.com</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

<Sect2>
<Title>C++ Tutorials</Title>

<Para>
ÀÎÅͳݿ¡´Â ¸¹Àº ¼öÀÇ ¿Â¶óÀÎ Æ©Å丮¾óÀÌ ÀÖ´Ù. °Ë»ö¿£Áø¿¡¼­ 'C++ tutorials'·Î
°Ë»öÀ» ÇغÁ¶ó.

<ItemizedList>
<ListItem>

<Para>
C++ Tutorial <ULink
URL="http://www.xploiter.com/programming/c/index.shtml"
>http://www.xploiter.com/programming/c/index.shtml</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
Cplusplus.com Tutorial <ULink
URL="http://www.cplusplus.com/doc/tutorial"
>http://www.cplusplus.com/doc/tutorial</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ Tutorial IISc, India <ULink
URL="http://www.csa.iisc.ernet.in/Documentation/Tutorials/StyleGuides/c++-style.html"
>http://www.csa.iisc.ernet.in/Documentation/Tutorials/StyleGuides/c++-style.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ Tutorial Brown Univ <ULink
URL="http://wilma.cs.brown.edu/courses/cs032/resources/C++tutorial.html"
>http://wilma.cs.brown.edu/courses/cs032/resources/C++tutorial.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ Tutorial <ULink
URL="http://home.msuiit.edu.ph/~ddd/tutorials/cpp/cpplist.htm"
>http://home.msuiit.edu.ph/~ddd/tutorials/cpp/cpplist.htm</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ Tutorial IOstreams <ULink
URL="http://osiris.sunderland.ac.uk/~cs0pdu/pub/com365/Sched3/iocpp.html"
>http://osiris.sunderland.ac.uk/~cs0pdu/pub/com365/Sched3/iocpp.html</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

<Sect2>
<Title>À¯¿ëÇÑ ¸µÅ©µé</Title>

<Para>

<ItemizedList>
<ListItem>
<Para>
Bird's eye view of C++ URLs ( 153°³ÀÇ URL link°¡ ÀÖ´Ù )
<ULink
URL="http://www.enteract.com/~bradapp/links/cplusplus-links.html"
>http://www.enteract.com/~bradapp/links/cplusplus-links.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
This <ULink
URL="URL: http://www.snippets.org"
>URL: http://www.snippets.org</ULink
>
360°³ÀÇ ÆÄÀÏ¿¡ ÇØ´çÇÏ´Â C codeµéÀÌ ÀÖ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 Mathtools <ULink
URL="http://www.mathtools.net"
>http://www.mathtools.net</ULink
> 
´Â ¸ðµç °úÇÐ, °øÇÐÀû ÇÊ¿ä¿¡ ÀÇÇÑ ±â¼úÀûÀÎ ÄÄÇ»Æà Æ÷Å»ÀÌ´Ù.
ÀÌ Æ÷Å»»çÀÌÆ®´Â ¹«·áÀÌ°í, 2¸¸¿©°³ÀÇ À¯¿ëÇÑ ±â¼úÀûÀÎ ÄÄÇ»ÅÍ ÇÁ·Î±×·¡¸ÓµéÀÇ
¸µÅ©¸¦ °¡Áö°í ÀÖ°í, C/C++, Java, Excel, MATLAB, Fortran µîÀ» ´Ù·ç°í ÀÖ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

<Sect2>
<Title>C++ Quick-Reference</Title>

<Para>
°Ë»ö¿£Áø¿¡¼­ 'C++ Reference' ·Î °Ë»öÀ» Çغ¸¾Æ¶ó.

<ItemizedList>
<ListItem>

<Para>
C++ quick ref <ULink
URL="http://www.cs.jcu.edu.au/~david/C++SYNTAX.html"
>http://www.cs.jcu.edu.au/~david/C++SYNTAX.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ Standard Library Quick Reference <ULink
URL="http://www.halpernwightsoftware.com/stdlib-scratch/quickref.html"
>http://www.halpernwightsoftware.com/stdlib-scratch/quickref.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ STL from halper <ULink
URL="http://www.halpernwightsoftware.com/stdlib-scratch/quickref.html"
>http://www.halpernwightsoftware.com/stdlib-scratch/quickref.html</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

<Sect2>
<Title>C++ Usenet ´º½º±×·ì</Title>

<Para>

<ItemizedList>
<ListItem>

<Para>
 C++ newsgroups : 
<ULink
URL="news:comp.lang.c++.announce"
>comp.lang.c++.announce</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 C++ newsgroups : 
<ULink
URL="news:comp.lang.c++.*"
>comp.lang.c++.*</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 C++ newsgroups : <ULink
URL="http://marshall-cline.home.att.net/cpp-faq-lite"
>http://marshall-cline.home.att.net/cpp-faq-lite</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

<Sect2>
<Title>Java ÇüÅÂÀÇ API</Title>

<Para>
C++¿¡¼­ Java ÇüÅÂÀÇ API¸¦ Á¦°øÇÏ´Â ´ÙÀ½ »çÀÌÆ®µéÀ» °¡º¸¾Æ¶ó.

<ItemizedList>
<ListItem>

<Para>
 Java utils in C++ <ULink
URL="http://www.pulsar.org/users/ej/archive/oop"
>http://www.pulsar.org/users/ej/archive/oop</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 PhD Thesis book Java API in C++ <ULink
URL="http://www.pulsar.org/archive/phd/ejphd"
>http://www.pulsar.org/archive/phd/ejphd</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

</Sect1>

<Sect1>
<Title>C++ ÄÚµù °ü½À</Title>

<Para>
ÄÚµù °ü½ÀÀº ÇÁ·Î±×·¥ÀÇ °¡µ¶¼º°ú À¯Áöº¸¼ö¸¦ À§ÇØ ¸Å¿ì Áß¿äÇÑ ¿ä¼ÒÀÌ´Ù.
¶ÇÇÑ ÇÁ·Î±×·¡¸ÓÀÇ »ý»ê¼ºÀ» Å©°Ô Çâ»ó½ÃŲ´Ù.
ÀÌ´Â ÁÁÀº ÄÚµù ÈÆ·ÃÀ» À§ÇØ ÇÊ¿äÇÏ´Ù.
¾Æ·¡ÀÇ ³»¿ëÀº class Á¤ÀÇ¿¡ ÀÖ¾î Á¦¾ÈµÈ °ÍÀÌ´Ù.

<ItemizedList>
<ListItem>

<Para>
 ¸ðµç public º¯¼öµéÀº  <Emphasis remap="bf">mFooVar</Emphasis>°ú °°ÀÌ <Emphasis remap="bf">m</Emphasis> À¸·Î ½ÃÀÛÇØ¾ß ÇÑ´Ù.
<Emphasis remap="bf">m</Emphasis> Àº <Emphasis remap="it">member</Emphasis>¸¦ ÀǹÌÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
¸ðµç protected º¯¼öµéÀº <Emphasis remap="bf">mtFooVar</Emphasis> ¿Í °°ÀÌ
<Emphasis remap="bf">mt</Emphasis> ·Î ½ÃÀÛÇؾßÇÏ°í, ¸Þ½îµå´Â <Emphasis remap="bf">tFooNum()</Emphasis> ¿Í °°ÀÌ t·Î ½ÃÀÛÇØ¾ß ÇÑ´Ù.
<Emphasis remap="bf">t</Emphasis> ´Â <Emphasis remap="it">protected</Emphasis>¸¦ ÀǹÌÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 ¸ðµç private º¯¼öµéÀº <Emphasis remap="bf">mvFooVar</Emphasis>¿Í °°ÀÌ
<Emphasis remap="bf">mv</Emphasis> ·Î ½ÃÀÛÇؾßÇÏ°í, ¸Þ½îµåµéÀº 
<Emphasis remap="bf">vFooLone()</Emphasis> ¿Í °°ÀÌ v·Î ½ÃÀÛÇØ¾ß ÇÑ´Ù.
<Emphasis remap="bf">v</Emphasis> ´Â  <Emphasis remap="it">private</Emphasis> À» ÀǹÌÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
¸ðµç public, protected, private º¯¼öÀ̸§µéÀº m ´ÙÀ½¿¡´Â <Emphasis remap="bf">mFooVar</Emphasis> ÀÇ F°°ÀÌ ´ë¹®ÀÚ·Î ½ÃÀÛÇؾßÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 ¸ðµç Æ÷ÀÎÅÍ º¯¼öµéÀº ´ÙÀ½°ú °°ÀÌ p·Î ½ÃÀÛÇØ¾ß ÇÑ´Ù.

<ItemizedList>
<ListItem>

<Para>
Public º¯¼ö <Emphasis remap="bf">mpFooVar</Emphasis>  °ú ¸Þ½îµå FooNum()
</Para>
</ListItem>
<ListItem>

<Para>
Protected º¯¼ö <Emphasis remap="bf">mtpFooVar</Emphasis> ¿Í ¸Þ½îµå tFooNum()
</Para>
</ListItem>
<ListItem>

<Para>
Private º¯¼ö <Emphasis remap="bf">mvpFooVar</Emphasis> ¿Í ¸Þ½îµå vFooNum()
</Para>
</ListItem>

</ItemizedList>

</Para>
</ListItem>

</ItemizedList>
¼¼°èÀûÀ¸·Î ÀÏ°üµÈ C++ ÄÚµù °ü½ÀÀº º¸´Ù ÇÁ·Î±×·¡¹ÖÀ» Àß ÇÒ ¼ö ÀÖµµ·Ï µµ¿ÍÁÙ °ÍÀÌ´Ù.
</Para>

<Para>
¾Æ·¡¿¡ ÁÖ¾îÁø ¿¹Á¦ Äڵ忡¼­ 
<Emphasis remap="bf">t</Emphasis> ´Â <Emphasis remap="bf">protected</Emphasis>¸¦,
<Emphasis remap="bf">v</Emphasis> ´Â <Emphasis remap="bf">private</Emphasis>¸¦,
<Emphasis remap="bf">m</Emphasis> ´Â <Emphasis remap="bf">member-variable</Emphasis> ¸¦,
<Emphasis remap="bf">p</Emphasis> ´Â <Emphasis remap="bf">pointer</Emphasis>¸¦
ÀǹÌÇÑ´Ù.

<ProgramListing>
class SomeFunMuncho
{
	public:
		int	mTempZimboniMacho; // OOP¿¡¼­´Â ¿ÀÁ÷ Àӽà º¯¼öµé¸¸ publicÀ̾î¾ß ÇÑ´Ù.
		float	*mpTempArrayNumbers;
		int	HandleError();
		float	getBonyBox();  // º¯¼ö¿¡ Á¢±ÙÇϱâ À§ÇÑ ÇÔ¼ö
		float	setBonyBox();  // º¯¼ö¿¡ Á¢±ÙÇϱâ À§ÇÑ ÇÔ¼ö

	protected:
		float	mtBonyBox;
		int	*mtpBonyHands;
		char	*tHandsFull();
		int	tGetNumbers();
	private:
		float	mvJustDoIt;
		char	mvFirstName[30];
		int	*mvpTotalValue;
		char	*vSubmitBars();
		int	vGetNumbers();
};
</ProgramListing>

ÇÁ·Î±×·¥ÀÌ ¼ö¹é¸¸ ¶óÀÎÀ¸·Î Ä¿Áö°Ô µÇ¸é, À§¿Í °°Àº °ü½ÀÀ» ¸Å¿ì ÁÁ¾ÆÇÏ°Ô
µÉ °ÍÀÌ´Ù. ´Ü¼øÈ÷ <Emphasis remap="bf">mvFirstName</Emphasis> ¶ó´Â º¯¼öÀ̸§À»
º» °Í¸¸À¸·Îµµ, ÀÌ°ÍÀÌ Å¬·¡½ºÀÇ ¸â¹öÀÌ°í, private º¯¼ö¶ó´Â °ÍÀ» ¾Ë ¼ö ÀÖÀ¸¹Ç·Î
ÄÚµåÀÇ °¡µ¶¼ºÀº ¿Ã¶ó°¡°Ô µÈ´Ù.
</Para>

<Para>
´ÙÀ½ÀÇ C++ ÄÚµù Ç¥ÁØ URLµéÀ» ¹æ¹®Çغ¸¾Æ¶ó.

<ItemizedList>
<ListItem>

<Para>
 C++ FAQ Lite - Coding standards <ULink
URL="http://www.parashift.com/c++-faq-lite/coding-standards.html"
>http://www.parashift.com/c++-faq-lite/coding-standards.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Rice university coding standard <ULink
URL="http://www.cs.rice.edu/~dwallach/CPlusPlusStyle.html"
>http://www.cs.rice.edu/~dwallach/CPlusPlusStyle.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Identifiers to avoid in C++ Programs <ULink
URL="http://oakroadsystems.com/tech/cppredef.htm"
>http://oakroadsystems.com/tech/cppredef.htm</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Coding standards from Possibility <ULink
URL="http://www.possibility.com/Cpp/CppCodingStandard.html"
>http://www.possibility.com/Cpp/CppCodingStandard.html</ULink
>
and <ULink
URL="http://www.cs.umd.edu/users/cml/cstyle/CppCodingStandard.html"
>mirror site</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Coding standards for Java and C++ from Ambysoft <ULink
URL="http://www.ambysoft.com/JavaCodingStandards.html"
>http://www.ambysoft.com/JavaCodingStandards.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Rules and recommendations <ULink
URL="http://www.cs.umd.edu/users/cml/cstyle/"
>http://www.cs.umd.edu/users/cml/cstyle/</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Indent and annotate <ULink
URL="http://www.cs.umd.edu/users/cml/cstyle/indhill-annot.html"
>http://www.cs.umd.edu/users/cml/cstyle/indhill-annot.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Elemental rules <ULink
URL="http://www.cs.umd.edu/users/cml/cstyle/Ellemtel-rules.html"
>http://www.cs.umd.edu/users/cml/cstyle/Ellemtel-rules.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 C++ style doc <ULink
URL="http://www.cs.umd.edu/users/cml/cstyle/Wildfire-C++Style.html"
>http://www.cs.umd.edu/users/cml/cstyle/Wildfire-C++Style.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 C++ Coding Standards by Brett Scolcum <ULink
URL="http://www.skypoint.com/~slocum/prog/cppstds.html"
>http://www.skypoint.com/~slocum/prog/cppstds.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Logikos C++ Coding Standards <ULink
URL="http://www.logikos.com/standards/cpp_std.html"
>http://www.logikos.com/standards/cpp_std.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 NRad C++ coding standards <ULink
URL="http://cadswes.colorado.edu/~billo/standards/nrad"
>http://cadswes.colorado.edu/~billo/standards/nrad</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 BEJUG C++ coding standards <ULink
URL="http://www.meurrens.org/ip-Links/java/joodcs/ToddHoff.html"
>http://www.meurrens.org/ip-Links/java/joodcs/ToddHoff.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 Arctic Labs coding standards <ULink
URL="http://www.arcticlabs.com/codingstandards"
>http://www.arcticlabs.com/codingstandards</ULink
>
</Para>

<Para>
See also
</Para>
</ListItem>
<ListItem>

<Para>
 For rapid navigation with ctags 
<ULink
URL="http://www.linuxdoc.org/LDP/HOWTO/Vim-HOWTO.html"
>Vim color text editor</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 To improve productivity see <ULink
URL="http://www.linuxdoc.org/LDP/HOWTO/C-C++Beautifier-HOWTO.html"
>C++ Beautifier HOWTO</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect1>

<Sect1>
<Title>C++ ½ºÅ©¸³Æ® ¾ð¾î</Title>

<Para>
C++ÀÇ Å« ´ÜÁ¡Àº Á¶±×¸¸ º¯°æÀ» ÇÒ ¶§¸¶´Ù Ç×»ó ÄÄÆÄÀÏ°ú ¸µÅ©¸¦ ´Ù½Ã
ÇØÁÖ¾î¾ß ½ÇÇàÆÄÀÏÀ» ¸¸µé ¼ö ÀÖ´Ù´Â °ÍÀÌ´Ù.
ÄÄÆÄÀÏ/¸µÅ©/µð¹ö±ë »çÀÌŬÀº ¸¹Àº ½Ã°£ÀÌ °É¸®°í »ý»êÀûÀÌÁö ¸øÇÏ´Ù.
Çö´ëÀÇ CPU¿Í RAMÀº ¸Å¿ì ºü¸£°í ½ÎÁö°í ÀÖÀ¸¹Ç·Î, ¾î¶² ¶§´Â
Çϵå¿þ¾î¿¡ ¸¹Àº µ·À» ÅõÀÚÇÏ°í, °³¹ßÀ» À§Çؼ­´Â script ¾ð¾î¸¦ ¾²´Â °ÍÀÌ
ÁÁÀ» ¼öµµ ÀÖ´Ù.
</Para>

<Sect2>
<Title>PIKE &#38; PHP (C/C++ Scripting Languages)</Title>

<Para>
PHP³ª PIKE °°Àº ½ºÅ©¸³Æ® ¾ð¾î´Â ¸µÅ·°ú ÀçÄÄÆÄÀÏ °úÁ¤À» ¾ø¾Ý°í,
µû¶ó¼­ °³¹ß °úÁ¤À» ´ÜÃà½Ãų ¼ö ÀÖ´Ù.
</Para>

<Para>
¸Þ¸ð¸®(RAM) °¡°ÝÀÌ ¶³¾îÁö°í, CPU ¼Óµµ°¡ ¿Ã¶ó°¨¿¡ µû¶ó
PHP³ª PIKE°°Àº ½ºÅ©¸³Æ® ¾ð¾îÀÇ Àαâ´Â <Emphasis remap="bf">Æø¹ß</Emphasis>ÇÒ °ÍÀÌ´Ù.
PHP³ª PIKE´Â °´Ã¼ÁöÇâ°ú C/C++À» ´àÀº ¹®¹ýÀ¸·Î ÀÎÇØ °¡Àå ³Î¸® ¾²ÀÌ´Â ½ºÅ©¸³Æ®
¾ð¾î°¡ µÉ °ÍÀÌ´Ù.
</Para>

<Para>
PHP³ª Pike C++ ½ºÅ©¸³Æ® ¾ð¾î¸¦ ¾¸À¸·Î½á ÇÁ·Î±×·¡¹ÖÀÇ »ý»ê¼ºÀº 
<Emphasis remap="bf">´Ù¼¸ ¹è</Emphasis> ³ª Áõ°¡ÇÒ °ÍÀÌ´Ù.
±×¸®°í PHP³ª PIKE´Â '°³³äÀÇ Áõ¸í'À» À§ÇØ À¯¿ëÇÏ°í, ÇÁ·ÎÅäŸÀÔÀ» ºü¸£°Ô ¸¸µé¾î³¾
¼ö ÀÖ´Ù.
</Para>

<Para>
PHP´Â ÀϹÝÀûÀÎ ÇÁ·Î±×·¡¹ÖÀ̳ª À¥ ÇÁ·Î±×·¡¹Ö¿¡¼­ ¸Å¿ì Àα⸦ ¾ò°í ÀÖ´Ù.
PHP´Â °¡±î¿î ¹Ì·¡¿¡ °¡Àå ³Î¸® ¾²ÀÌ´Â ½ºÅ©¸³Æ® ¾ð¾î°¡ µÉ °ÍÀÌ´Ù.
PHP ´Â  <ULink
URL="http://www.linuxdoc.org/HOWTO/PHP-HOWTO.html"
>http://www.linuxdoc.org/HOWTO/PHP-HOWTO.html</ULink
> ( <ULink URL="http://kldp.org/HOWTO/html/PHP/PHP-HOWTO.html"> Çѱ۹ø¿ª </ULink> )
¿¡ ÀÖ´Ù.
</Para>

<Para>
The Pike ´Â <ULink
URL="http://pike.roxen.com"
>http://pike.roxen.com</ULink
> ¿Í <ULink
URL="http://www.roxen.com"
>http://www.roxen.com</ULink
> ¿¡ ÀÖ´Ù.
</Para>

<Para>
Roxen À¥¼­¹ö´Â ¼ø¼öÇÏ°Ô Pike·Î ¾²¿©Á®¼­, ¾ó¸¶³ª Pike°¡ °­·ÂÇÑÁö º¸¿©ÁÖ°í ÀÖ´Ù.
Pike´Â ¸î¸î ÀÛ¾÷¿¡ ´ëÇؼ­´Â Javaº¸´Ù ºü¸£°Ô µ¹¾Æ°¡°í, ¸Þ¸ð¸®µµ »ó´çÈ÷
È¿À²ÀûÀ¸·Î »ç¿ëÇÑ´Ù.
</Para>

</Sect2>

<Sect2>
<Title>SoftIntegration Ch (C/C++ ½ºÅ©¸³Æ® ¾ð¾î)</Title>

<Para>
¸¸¾à »ó¿ë ½ºÅ©¸³Æ® ¾ð¾î¸¦ ¿øÇÑ´Ù¸é, 
SoftIntegration corporation ( <ULink
URL="http://www.softintegration.com"
>http://www.softintegration.com</ULink
> ) ¿¡¼­ 'Ch scripting'À» º¸¾Æ¶ó.
</Para>

<Para>
Ch¶ó ºÒ¸®´Â ½ºÅ©¸³Æ® ¾ð¾î ȯ°æÀº C¸¦ Æ÷ÇÔÇÏ°í, ³ôÀº ¼öÁØÀÇ È®Àåµé°ú
C++À» ºñ·ÔÇÑ ´Ù¸¥ ¾ð¾îµéÀÇ Æ¯Â¡µéÀ» Æ÷ÇÔÇÑ´Ù. µû¶ó¼­ Çѹø ¹è¿ì±â¸¸ Çϸé
°ÅÀÇ ¸ðµç Á¾·ùÀÇ ÇÁ·Î±×·¡¹Ö¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
ÀÌ Cȣȯ ½ºÅ©¸³Æ® ¾ð¾î ȯ°æÀº ¿©·¯ Ç÷§Æû¿¡¼­ ÇÑ ÇÁ·Î±×·¥À» À̽İ¡´ÉÇÏ°Ô
ÇÏ´Â Áß°£ ¿ªÇÒÀ» ÇÑ´Ù.
À̽İ¡´ÉÇÑ Ch ÄÚµå´Â ÀÎÅͳݰú ÀÎÆ®¶ó³ÝÀ» ÅëÇØ ½´ÆÛÄÄÇ»ÅͺÎÅÍ ¿÷½ºÅ×À̼Ç,
PC, ÆÊ(Palm), PDA ¸¦ ºñ·Ô ÄÄÇ»ÅÍÀÇ ¹üÁÖ¿¡ ¼ÓÇÏÁö ¾Ê´Â CNC ¸Ó½Å, ·Îº¿,
TV, ³ÃÀå°í µî À¸·Î ÆÛÁ® ¾îµð¼­³ª ¾ÈÀüÇÏ°Ô µ¹¾Æ°¥ ¼ö ÀÖ´Ù.
</Para>

</Sect2>

<Sect2>
<Title>PHP (C++ Scripting Language)</Title>

<Para>
PHP´Â À¥¹®¼­¸¦ ó¸®ÇÏ´Â ½ºÅ©¸³Æ® ¾ð¾î·Î ¸Å¿ì ºü¸£°Ô ÁøÈ­Çß°í, °´Ã¼ÁöÇâÀ»
Áö¿øÇÑ´Ù. PHP´Â 'class'¶ó´Â Å°¿öµå¸¦ °¡Áö°í °´Ã¼ÁöÇâ ½ºÅ©¸³ÆÃÀ» ±¸ÇöÇÏ°íÀÚ Çß´Ù.
¾Æ¸¶µµ °¡±î¿î ½ÃÀϳ»¿¡ PHP´Â °´Ã¼ ÁöÇâ ÇÁ·ÎÁ§Æ®¸¦ À§ÇÑ °­·ÂÇÑ ½ºÅ©¸³Æ® ¾ð¾î·Î
ºü¸£°Ô ÁøÈ­ÇÒ °ÍÀÌ´Ù. °¡±î¿î ¹Ì·¡¿¡ PHP´Â À¥ÇÁ·Î±×·¡¹Ö »Ó ¾Æ´Ï¶ó ÀϹÝÀûÀÎ
¾îÇø®ÄÉÀÌ¼Ç ÇÁ·Î±×·¡¹Ö¿¡µµ ¾²ÀÌ°Ô µÉ °ÍÀÌ´Ù.
À¥°ú ÀÏ¹Ý ¾îÇø®ÄÉÀ̼ǿ¡ ´Ù¸¥ ¾ð¾î¸¦ ¾²±â º¸´Ù´Â ±×³É PHP¸¸ ¾²¸é µÉ °ÍÀ̱â
¶§¹®ÀÌ´Ù. PHP HOWTO :
<ULink
URL="http://www.linuxdoc.org/HOWTO/PHP-HOWTO.html"
>http://www.linuxdoc.org/HOWTO/PHP-HOWTO.html</ULink
> ( <ULink URL="http://kldp.org/HOWTO/html/PHP/PHP-HOWTO.html"> Çѱ۹ø¿ª </ULink>.
</Para>

</Sect2>

</Sect1>

<Sect1>
<Title>Templates</Title>

<Para>
Template ´Â ÄÚµå Àç»ç¿ëÀ» ½±°Ô ¸¸µé¾î generic ÇÁ·Î±×·¡¹ÖÀ» °¡´ÉÇÏ°Ô ÇÏ´Â C++ÀÇ Æ¯Â¡ÀÌ´Ù.
</Para>

<Para>
¾Æ·¡¿Í °°Àº °£´ÜÇÑ ¿¹¸¦ º¸ÀÚ :
</Para>

<Para>

<ProgramListing>
#include &#60;string&#62;
#include &#60;iostream&#62;

void printstring(const std::string&#38; str) {
    std::cout &#60;&#60; str &#60;&#60; std::endl;
}

int main()
{
    std::string str("Hello World");
    printstring(str);
}
</ProgramListing>

</Para>

<Para>
<Emphasis remap="bf">printstring()</Emphasis> ´Â <Emphasis remap="bf">std::string</Emphasis> 
¸¦ ù¹ø° ÀÎÀÚ·Î ¹Þ´Â´Ù. µû¶ó¼­ ÀÌ´Â ¿ÀÁ÷ string¸¸ ÇÁ¸°Æ® ÇÒ ¼ö ÀÖ°í,
¹®Àڹ迭(char array)À» ÇÁ¸°Æ® Çϱâ À§Çؼ­´Â ÇÔ¼ö¸¦ ¿À¹ö·Îµù½ÃÅ°µç°¡
»õ·Î¿î À̸§ÀÇ ÇÔ¼ö¸¦ ¸¸µé¾î¾ß ÇÑ´Ù.
</Para>

<Para>
ÀÌ´Â ÇÔ¼öÀÇ ±¸ÇöÀÌ Áߺ¹µÇ¹Ç·Î ÁÁÁö ¾ÊÀº °ÍÀÌ°í,
À¯Áöº¸¼öÇϱⰡ Èûµé¾îÁö°Ô µÈ´Ù.
</Para>

<Para>
templateÀ» ¾²¸é ¿ì¸®´Â Äڵ带 Àç»ç¿ë°¡´ÉÇÏ°Ô ¸¸µé ¼ö ÀÖ´Ù.
¾Æ·¡¿Í °°Àº ÇÔ¼ö¸¦ º¸¶ó :
</Para>

<Para>

<ProgramListing>
template&#60;typename T&#62; 
void print(const T&#38; var) {
    std::cout &#60;&#60; var &#60;&#60; std::endl;
}
</ProgramListing>

</Para>

<Para>
ÄÄÆÄÀÏ·¯´Â ¿ì¸®°¡ ¹«½¼ ŸÀÔÀ» ³Ñ°ÜÁÖµçÁö ¾Ë¾Æ¼­ <Emphasis remap="bf">print</Emphasis> 
ÇÔ¼öÀÇ Äڵ带 ÀÚµ¿À¸·Î ¸¸µé¾î ÁÙ °ÍÀÌ´Ù.
ÀÌ°ÍÀÌ templateÀÇ Áß¿äÇÑ ÀåÁ¡ÀÌ´Ù.
Java´Â templateÀÌ ¾ø°í, µû¶ó¼­ Java¿¡¼­ÀÇ generic ÇÁ·Î±×·¡¹Ö°ú ÄÚµå Àç »ç¿ëÀº
´õ Èûµé´Ù.
</Para>

<Para>
·¹ÆÛ·±½º :
</Para>

<Para>

<ItemizedList>
<ListItem>
<Para>
 <ULink
URL="http://babbage.cs.qc.edu/STL_Docs/templates.htm"
>http://babbage.cs.qc.edu/STL_Docs/templates.htm</ULink
>
¹Ì·¯ : <ULink
URL="http://www.mike95.com/c_plusplus/tutorial/templates"
>http://www.mike95.com/c_plusplus/tutorial/templates</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 ÀÌ°ÍÀº &num;pragma template¿¡ ´ëÇØ ¾Ë·ÁÁØ´Ù : -
<ULink
URL="http://www.dgp.toronto.edu/people/JamesStewart/270/9697f/notes/Nov25-tut.html"
>http://www.dgp.toronto.edu/people/JamesStewart/270/9697f/notes/Nov25-tut.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 ¸Å¿ì ÁÁÀº site: 
<ULink
URL="http://www.cplusplus.com/doc/tutorial/tut5-1.html"
>http://www.cplusplus.com/doc/tutorial/tut5-1.html</ULink
>
<ULink
URL="http://www.cplusplus.com/doc/tutorial"
>http://www.cplusplus.com/doc/tutorial</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 C++ÀÇ °ËÁõÀ» À§ÇØ : <ULink
URL="http://examware.com"
>http://examware.com</ULink
> ¿¡ °¡¼­ "Tutorials"¸¦ Ŭ¸¯ÇÏ°í C/C++ ¹öÆ°À» ´©¸£½Ã¿À.
</Para>
</ListItem>
<ListItem>
<Para>
 C++ Open books: <ULink
URL="http://www.softpanorama.org/Lang/cpp.shtml"
>http://www.softpanorama.org/Lang/cpp.shtml</ULink
>
tutorialÀ» Ŭ¸¯
</Para>
</ListItem>
<ListItem>

<Para>
 Templates tutorial : <ULink
URL="http://www.infosys.tuwien.ac.at/Research/Component/tutorial/prwmain.htm"
>http://www.infosys.tuwien.ac.at/Research/Component/tutorial/prwmain.htm</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect1>

<Sect1 id="stlref">
<Title>STL References </Title>

<Para>
STL¿¡ °üÇÑ ´ÙÀ½ »çÀÌÆ®µéÀ» ¹æ¹®Çغ¸¶ó :

<ItemizedList>
<ListItem>

<Para>
 iterator¿¡ ´ëÇÑ ¸Å¿ì ÁÁÀº ¼³¸í
<ULink
URL="http://www.cs.trinity.edu/~joldham/1321/lectures/iterators/"
>http://www.cs.trinity.edu/~joldham/1321/lectures/iterators/</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Intro to STL SGI
<ULink
URL="http://www.sgi.com/tech/stl/stl_introduction.html"
>http://www.sgi.com/tech/stl/stl_introduction.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Mumits STL Ãʺ¸ °¡À̵å (¾à°£ ¿À·¡µÈ °Í)
<ULink
URL="http://www.xraylith.wisc.edu/~khan/software/stl/STL.newbie.html"
>http://www.xraylith.wisc.edu/~khan/software/stl/STL.newbie.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 ObjectSpace ¿¹Á¦ : ObjectSpace´Â 300°³°¡ ³Ñ´Â ¿¹Á¦¸¦ °¡Áö°í ÀÖ°í, µû¶ó¼­
 Ãʺ¸ÀÚ¿¡°Ô ¾ÆÁÖ ÁÁÀº Ãâ¹ßÁ¡À» Á¦½ÃÇØÁØ´Ù.
<ULink
URL="ftp://butler.hpl.hp.com/stl/examples.zip"
>ftp://butler.hpl.hp.com/stl/examples.zip</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Joseph Y. Laurino's STL page. 
<ULink
URL="http://weber.u.washington.edu/~bytewave/bytewave_stl.html"
>http://weber.u.washington.edu/~bytewave/bytewave_stl.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Marian Corcoran's STL FAQ. 
<ULink
URL="ftp://butler.hpl.hp.com/stl/stl.faq"
>ftp://butler.hpl.hp.com/stl/stl.faq</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
STL tutorials:

<ItemizedList>
<ListItem>

<Para>
 Phil Ottewell's STL Tutorial - <ULink
URL="http://www.yrl.co.uk/~phil/stl/stl.htmlx"
>http://www.yrl.co.uk/~phil/stl/stl.htmlx</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 ÁÁÁö¸¸ ¿À·¡µÈ ¹®¼­ - <ULink
URL="http://www.decompile.com/html/tut.html"
>http://www.decompile.com/html/tut.html</ULink
>
¹Ì·¯ : <ULink
URL="http://mip.ups-tlse.fr/~grundman/stl-tutorial/tutorial.html"
>http://mip.ups-tlse.fr/~grundman/stl-tutorial/tutorial.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 The Code Project, C++/STL/MFC ¿¡ ´ëÇÑ ¼Ò°³  <ULink
URL="http://www.codeproject.com/cpp/stlintroduction.asp"
>http://www.codeproject.com/cpp/stlintroduction.asp</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 C++ Standard Template Library, another great tutorial, by Mark Sebern
<ULink
URL="http://www.msoe.edu/eecs/cese/resources/stl/index.htm"
>http://www.msoe.edu/eecs/cese/resources/stl/index.htm</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Technical University Vienna by Johannes Weidl <ULink
URL="http://dnaugler.cs.semo.edu/tutorials/stl"
>http://dnaugler.cs.semo.edu/tutorials/stl</ULink
>
mirror <ULink
URL="http://www.infosys.tuwien.ac.at/Research/Component/tutorial/prwmain.htm"
>http://www.infosys.tuwien.ac.at/Research/Component/tutorial/prwmain.htm</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
Main STL sites:

<ItemizedList>
<ListItem>

<Para>
C++ STL from SGI <ULink
URL="http://www.sgi.com/tech/stl"
>http://www.sgi.com/tech/stl</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ STL from RPI univ <ULink
URL="http://www.cs.rpi.edu/projects/STL/htdocs/stl.html"
>http://www.cs.rpi.edu/projects/STL/htdocs/stl.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ STL site 
<ULink
URL="http://dmoz.org/Computers/Programming/Languages/C++/Class_Libraries/STL"
>ODP for STL</ULink
>
¿Í
<ULink
URL="http://dir.lycos.com/Computers/Programming/Languages/C%2B%2B/Class_Libraries/STL"
>¹Ì·¯</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
STL for C++ Programmers <ULink
URL="http://userwww.econ.hvu.nl/~ammeraal/stlcpp.html"
>http://userwww.econ.hvu.nl/~ammeraal/stlcpp.html</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
C++ STL from halper <ULink
URL="http://www.halpernwightsoftware.com/stdlib-scratch/quickref.html"
>http://www.halpernwightsoftware.com/stdlib-scratch/quickref.html</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Sect2>
<Title>STL °³¿ä</Title>

<Para>
STLÀº ÇÁ·Î±×·¡¸Ó¿¡°Ô ¸î°¡Áö À¯¿ëÇÑ µ¥ÀÌÅͱ¸Á¶¿Í ¾Ë°í¸®ÁòÀ» Á¦°øÇÑ´Ù.
ÀÌ´Â ´ÙÀ½°ú °°Àº °ÍµéÀÌ ÀÖ´Ù.
</Para>

<Para>

<ItemizedList>
<ListItem>
<Para>
     ÄÁÅ×À̳Ê. µÎ °¡Áö ŸÀÔÀÌ ÀÖ´Ù :

<ItemizedList>
<ListItem>

<Para>
 ¼øÂ÷Àû(Sequential). ¿©±â¿¡´Â vector, list, deque µîÀÌ ÀÖ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 Á¤·ÄµÈ Á¶ÇÕ(Associative). ¿©±â¿¡´Â set, map, multiset, multimap ÀÌ ÀÖ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>
</ListItem>
<ListItem>
<Para>
 Iterator. ÄÁÅ×À̳ÊÀÇ ³»¿ëÀ» »ìÆ캼 ¼ö ÀÖ°Ô ÇØÁÖ´Â Æ÷ÀÎÅÍ °°Àº °ÍµéÀÌ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
 ÀϹÝÀûÀÎ(generic) ¾Ë°í¸®Áòµé. STLÀº ÄÁÅ×ÀÌ³Ê Å¸ÀÔ¿¡ ´ëÇØ µ¿ÀÛÇÏ´Â
 ¿©·¯°¡Áö È¿°úÀûÀ¸·Î ±¸ÇöµÈ Ç¥ÁØ ¾Ë°í¸®Áòµé
 (¿¹¸¦µé¾î find, sort, merge µî)ÀÌ ÀÖ´Ù.
 (¸î¸î containerµéÀº ÀÌ Áß ÀϺθ¦ Ưº°ÇÑ ¸ñÀûÀ¸·Î ¸â¹öÇÔ¼ö·Î °®°í ÀÖ´Ù)
</Para>
</ListItem>
<ListItem>
<Para>
 Function obejct. function object´Â operator()ÀÇ Á¤ÀǸ¦ Á¦°øÇÏ´Â classÀÇ instanceÀÌ´Ù.
 ÀÌ´Â ÀÌ objectµéÀ» ÇÔ¼ö °°ÀÌ »ç¿ëÇÒ ¼ö ÀÖ´Ù´Â °ÍÀÌ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
 Adaptors. STLÀº ´ÙÀ½°ú °°Àº °ÍµéÀ» Á¦°øÇÑ´Ù.

<ItemizedList>
<ListItem>

<Para>
 Container adaptor´Â vector¸¦ stackÀ» ¸¸µé±â À§ÇÑ ±âÃÊ·Î »ç¿ëÇÒ ¼ö ÀÖ°Ô ÇØÁØ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 function adaptor ´Â ÀÌ¹Ì Á¸ÀçÇÏ´Â function object·ÎºÎÅÍ »õ·Î¿î function object¸¦
 ¸¸µé ¼ö ÀÖ°Ô ÇØÁØ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>
</ListItem>
<ListItem>

<Para>
 Allocators. ¸ðµç STL ÄÁÅ×ÀÌ³Ê class´Â ÇÁ·Î±×·¥ÀÌ »ç¿ëÇÏ´Â ¸Þ¸ð¸® Á¤º¸¸¦ °®°í ÀÖ±â À§ÇÑ
 allocator class¸¦ »ç¿ëÇÑ´Ù. ÇÏÁö¸¸ ³ª´Â ÀÌ ºÎºÐÀº »ý·«ÇÒ °ÍÀÌ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
¾ÕÀ¸·Î vector, list, set ±×¸®°í map ÄÁÅ×À̳ÊÀÇ »ç¿ë¹ýÀ» »ìÆ캼 °ÍÀÌ´Ù.
À̵éÀ» »ç¿ëÇϱâ À§Çؼ­´Â ³»°¡ STL iterator¿¡ ´ëÇØ ¸»ÇÒ ¼ö ÀÖµµ·Ï
iterator¸¦ ¾µ ÁÙ ¾Ë¾Æ¾ß ÇÒ °ÍÀÌ´Ù. ¶Ç set°ú map ÄÁÅ×À̳ʸ¦ »ç¿ëÇÑ´Ù´Â °ÍÀº
³»°¡ function object¿¡ ´ëÇØ ¹º°¡ ¼³¸íÇÒ ¼ö ÀÖµµ·Ï °£´ÜÇÑ function object°¡
ÀÖ¾î¾ß ÇÑ´Ù´Â °ÍÀÌ´Ù.
STLÀÌ Áö¿øÇÏ´Â ¾Ë°í¸®Áò¿¡ ´ëÇؼ­´Â °£´ÜÈ÷ ¼³¸íÇÒ °ÍÀÌ°í, adoptor´Â 
¾ð±ÞÇÏÁö ¾ÊÀ» °ÍÀÌ´Ù.
</Para>

<Para>
¸î¸î ÇÔ¼ö ÀÎÀÚÀÇ Å¸ÀÔ¿¡ ´ëÇؼ­ À̸§ÀÌ ¹Ù²ð ¼ö ÀÖ´Ù. ¿¹¸¦µé¾î ´ëºÎºÐÀÇ int
ŸÀÔ ÀÎÀÚµéÀº ½ÇÁ¦·Î´Â size&lowbar;typeÀ̶ó´Â typeÀ» °®°í ÀÌ°ÍÀÌ ÀûÀýÇÑ
±âº» ŸÀÔÀ¸·Î tyepdefµÇ´Â ÇüÅ¿¡ ÀÇÇØ ¾²ÀδÙ. ¸¸¾à ¿©·¯ ÇÔ¼öµéÀÇ ½ÇÁ¦
ÀÎÀÚ Å¸ÀÔÀ» ¾Ë°í½Í´Ù¸é ÀÛ¾÷ÇÏ´Â °Í¿¡ ´ëÇÑ ¹®¼­³ª Çì´õÆÄÀÏÀ» Âü°íÇضó.
</Para>

<Para>
STL¿¡¼­ Á¦°øµÇ´Â ¸î°¡Áö À¯Æ¿¸®Æ¼ classµéÀÌ Àִµ¥, ÀÌ Áß Á¦ÀÏ Áß¿äÇÑ °ÍÀº
pair classÀÌ´Ù. ÀÌ´Â ´ÙÀ½°ú °°ÀÌ Á¤ÀǵǾîÀÖ´Ù.
</Para>

<Para>

<ProgramListing>
template&#60;class T1, class T2&#62;
class pair {
public:
    T1 first;
    T2 second;
    pair(const T1&#38; a, const T2&#38; b) : first(a), second(b) {}

};
</ProgramListing>

</Para>

<Para>
±×¸®°í ½±°Ô pair¸¦ ¸¸µéµµ·Ï ´ÙÀ½°ú °°Àº make&lowbar;pair ÇÔ¼ö°¡ Á¦°øµÈ´Ù :
</Para>

<Para>

<ProgramListing>
pair&#60;T1,T2&#62; make_pair(const T1&#38; f, const T2&#38;,s)
</ProgramListing>

</Para>

<Para>
¶ÇÇÑ ==¿Í &lt; ¿¬»êÀÚµµ ÀÖ´Ù. ÀÌ template class¿¡´Â º¹ÀâÇÑ °ÍÀÌ ¾ø°í
±×³É »ç¿ëÇÏ¸é µÈ´Ù. À̸¦ ÀÌ¿ëÇϱâ À§Çؼ­´Â &num;include ·Î &lt;utility&gt;¸¦
includeÇÏ¸é µÈ´Ù. pair´Â ¿©·¯°÷¿¡¼­ ¾²ÀÏ ¼ö Àִµ¥, ƯÈ÷ set°ú map class¿¡¼­
¸¹ÀÌ ³ªÅ¸³­´Ù.
</Para>

</Sect2>

<Sect2>
<Title>Çì´õ ÆÄÀÏ</Title>

<Para>
STLÀ» »ç¿ëÇϱâ À§Çؼ­´Â ÀûÀýÇÏ°Ô Çì´õÆÄÀÏÀ» &num;include ÇØÁÖ¾î¾ß ÇÑ´Ù.
¸¸¾à ÄÄÆÄÀÏ·¯°¡ Ç¥ÁØ¿¡ ¸ÂÁö ¾Ê´Â´Ù¸é ¾à°£ ´Ù¸¦ ¼öµµ ÀÖÁö¸¸,
Ç¥ÁØ¿¡ ¸Â´Â ÄÄÆÄÀÏ·¯ (g++ °°Àº)´Â ´ÙÀ½°ú °°ÀÌ ÇÏ¸é µÈ´Ù :
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
 &lt;<Emphasis remap="it">vector</Emphasis>&gt; : º¤ÅÍ Å¸ÀÔ
</Para>
</ListItem>
<ListItem>

<Para>
 &lt;<Emphasis remap="it">list</Emphasis>&gt; :  ¸®½ºÆ® ŸÀÔ
</Para>
</ListItem>
<ListItem>

<Para>
 &lt;<Emphasis remap="it">set</Emphasis>&gt; : ÁýÇÕ(set) ŸÀÔ
</Para>
</ListItem>
<ListItem>

<Para>
 &lt;<Emphasis remap="it">map</Emphasis>&gt; : ¸Ê ŸÀÔ
</Para>
</ListItem>
<ListItem>

<Para>
 &lt;<Emphasis remap="it">algorithm</Emphasis>&gt; : ÀϹÝÀûÀÎ ¾Ë°í¸®Áò µé
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
Ç¥ÁØ C++ ¶óÀ̺귯¸®´Â <Emphasis remap="bf">.h</Emphasis> ¸¦ µÚ¿¡ ºÙÀÌÁö ¾Ê´Â ´Ù´Â °Í¿¡
ÁÖÀÇÇضó. ¸¸¾à ¿¾¹öÀüÀÇ È¤Àº ÁÁÁö ¾ÊÀº ÄÄÆÄÀÏ·¯¸¦ »ç¿ëÇϴµ¥, À§¿Í °°ÀÌ Çؼ­ include°¡
µÇÁö ¾Ê´Â´Ù¸é <Emphasis remap="bf">.h</Emphasis>¸¦ ºÙ¿©¼­ ½ÃµµÇغ¸¾Æ¶ó.
ÇÏÁö¸¸ ±×º¸´Ù´Â »õ·Î¿î ÄÄÆÄÀÏ·¯¸¦ ±¸ÇÏ´Â °Ô ´õ ³ªÀ» °ÍÀÌ´Ù.
</Para>

</Sect2>

<Sect2>
<Title>ÄÁÅ×ÀÌ³Ê class ÀÎÅÍÆäÀ̽º</Title>

<Para>
ÄÁÅ×ÀÌ³Ê classµéÀº ¼­·Î °°Àº À̸§À» °®´Â ¸â¹öÇÔ¼ö¸¦ ¸¹ÀÌ °®´Â´Ù.
ÀÌ ÇÔ¼öµéÀº ¸ðµç class¿¡ ´ëÇØ ¶È°°Àº (ȤÀº ¸Å¿ì ºñ½ÁÇÑ) ÀÎÅÍÆäÀ̽º¸¦
Á¦°øÇÑ´Ù (±×·¯³ª ¹°·Ð ±× ³»ºÎ ±¸ÇöÀº ´Ù¸¦ °ÍÀÌ´Ù). ¾Æ·¡ÀÇ Ç¥´Â
¿ì¸®°¡ »ìÆ캼 ÇÔ¼öµéÀ» ³ª¿­ÇÑ °ÍÀÌ´Ù.
º°Ç¥´Â ±× ÄÁÅ×ÀÌ³Ê Å¸ÀÔÀÌ ±× À̸§ÀÇ ¸â¹ö ÇÔ¼ö¸¦ Á¦°øÇÑ´Ù´Â °ÍÀÌ´Ù.
</Para>

<Para>

<Table>
<Title><Emphasis remap="bf">ÄÁÅ×ÀÌ³Ê Class ÀÎÅÍÆäÀ̽º</Emphasis></Title>

<TGroup Cols="3">
<ColSpec Align="Right" Colsep="0">
<ColSpec Align="Left" Colsep="0">
<ColSpec Align="Left" Colsep="0">
<TBody>
<Row RowSep="1">
<Entry>¿¬»êÀÚ/ÇÔ¼ö¸í</Entry>
<Entry>¸ñÀû </Entry>
<Entry>vector </Entry>
<Entry>list </Entry>
<Entry>set </Entry>
<Entry>map </Entry>
</Row>
<Row>
<Entry>
== </Entry>
<Entry>ºñ±³ </Entry>
<Entry>* </Entry>
<Entry>*</Entry>
<Entry>*</Entry>
<Entry>*</Entry>
</Row>
<Row>
<Entry>
&lt;</Entry>
<Entry> ºñ±³</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
</Row>
<Row>
<Entry>
begin</Entry>
<Entry> iterator</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry></Entry>
</Row>
<Row>
<Entry>
end</Entry>
<Entry> iterator</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
</Row>
<Row>
<Entry>
size</Entry>
<Entry> ¿ø¼ÒÀÇ ¼ö</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
</Row>
<Row>
<Entry>
empty</Entry>
<Entry> ºñ¾ú´ÂÁö</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
</Row>
<Row>
<Entry>
front</Entry>
<Entry> ù¹ø° ¿ø¼Ò</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry>&nbsp; </Entry>
<Entry>&nbsp; </Entry>
</Row>
<Row>
<Entry>
back</Entry>
<Entry> ¸¶Áö¸· ¿ø¼Ò</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry>&nbsp; </Entry>
<Entry>&nbsp; </Entry>
</Row>
<Row>
<Entry>
&lsqb; &rsqb; </Entry>
<Entry> ¿ø¼Ò Á¢±Ù ¹× º¯°æ</Entry>
<Entry> *</Entry>
<Entry>&nbsp; </Entry>
<Entry>&nbsp; </Entry>
<Entry>*</Entry>
<Entry></Entry>
</Row>
<Row>
<Entry>
insert</Entry>
<Entry> ¿ø¼Ò(µé) Ãß°¡</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
</Row>
<Row>
<Entry>
push&lowbar;back</Entry>
<Entry> ¸Ç µÚ¿¡ ¿ø¼Ò Ãß°¡</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry>&nbsp; </Entry>
<Entry>&nbsp; </Entry>
</Row>
<Row>
<Entry>
push&lowbar;front</Entry>
<Entry> ¸Ç ¾Õ¿¡ ¿ø¼Ò Ãß°¡</Entry>
<Entry>&nbsp; </Entry>
<Entry>* </Entry>
<Entry>&nbsp;</Entry>
<Entry>&nbsp; </Entry>
</Row>
<Row>
<Entry>
erase</Entry>
<Entry> ¿ø¼Ò(µé) »èÁ¦</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
</Row>
<Row>
<Entry>
pop&lowbar;back</Entry>
<Entry> ¸Ç µÚ ¿ø¼Ò »èÁ¦</Entry>
<Entry> *</Entry>
<Entry> *</Entry>
<Entry>&nbsp; </Entry>
<Entry>&nbsp; </Entry>
</Row>
<Row>
<Entry>
pop&lowbar;front</Entry>
<Entry> ¸Ç ¾Õ ¿ø¼Ò »èÁ¦</Entry>
<Entry>&nbsp; </Entry>
<Entry>*</Entry>
<Entry>&nbsp;</Entry>
<Entry>&nbsp; </Entry>
</Row>
<Row>
<Entry>
</Entry>
</Row>
</TBody>

</TGroup>

</Table>

</Para>

<Para>
¸¸¾à ¾Æ·¡ÀÇ ³»¿ëÁß Àǹ®°¡´Â ºÎºÐÀÌ ÀÖÀ¸¸é (¾Æ¸¶µµ ÀÕÀ» °ÍÀÌ´Ù),
Á¶±×¸¸ Å×½ºÆ® ÇÁ·Î±×·¥À» Çϳª Â¥¼­ ¾î¶»°Ô µ¹¾Æ°¡´Â Áö ¾Ë¾Æº¼ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
</Para>

</Sect2>

<Sect2>
<Title>º¤ÅÍ : Vectors </Title>

<Para>
º¤ÅÍ´Â C++ÀÇ ¹è¿­°ú ºñ½ÁÇÑ, ÇÏÁö¸¸ À̸¦ ¹ßÀü½ÃŲ ÄÁÅ×À̳ÊÀÌ´Ù.
ƯÈ÷, º¤ÅÍ´Â ¼±¾ð½Ã¿¡ ¾ó¸¶³ª º¤ÅÍ°¡ Ä¿¾ßÇÒÁö¸¦ ¾Ë ÇÊ¿ä°¡ ¾ø°í,
<Emphasis remap="bf"><Emphasis remap="it">push&lowbar;back</Emphasis></Emphasis>
ÇÔ¼ö¸¦ ÀÌ¿ëÇÏ¿© ¾ðÁ¦³ª »õ·Î¿î ¿ø¼Ò¸¦ Ãß°¡ÇÒ ¼ö ÀÖ´Ù.
( »ç½Ç <Emphasis remap="bf"><Emphasis remap="it">insert</Emphasis></Emphasis> 
ÇÔ¼ö°¡ ¾îµð¿¡µç »õ ¿ø¼ÒµéÀ» ³ÖÀ» ¼ö ÀÖ°Ô ÇØÁÖÁö¸¸, ÀÌ´Â ¸Å¿ì ºñÈ¿À²ÀûÀÌ´Ù.
¸¸¾à À̸¦ ÀÚÁÖ ÇؾßÇÑ´Ù¸é list¸¦ ´ë½Å »ç¿ëÇÏ´Â °ÍÀ» °í·ÁÇغ¸¾Æ¶ó. )
</Para>

<Sect3>
<Title>º¤ÅÍ ¸¸µé±â</Title>

<Para>
<Emphasis remap="it">º¤ÅÍ</Emphasis>´Â class templateÀ̹ǷÎ, ¼±¾ð½Ã¿¡ º¤ÅÍ°¡ °®°Ô µÉ
°´Ã¼ÀÇ Å¸ÀÔÀ» ¼±¾ðÇØÁÖ¾î¾ß ÇÑ´Ù. ¿¹¸¦µé¾î ´ÙÀ½°ú °°´Ù.
</Para>

<Para>

<ProgramListing>
vector&#60;int&#62; v1;
vector&#60;string&#62; v2;
vector&#60;FiniteAutomaton&#62; v3;
</ProgramListing>

</Para>

<Para>
À§ ³»¿ëÀº v1À» int °ªÀ» °®´Â º¤ÅÍ·Î, v2¸¦ stringÀ» °®´Â º¤ÅÍ·Î, v3¸¦
FiniteAutomaton (¾Æ¸¶µµ ¹Ì¸® ÀÌ·± ŸÀÔÀÌ ¼±¾ðµÇ¾úÀ» °ÍÀÌ´Ù) ¸¦ °®°í ÀÖ´Â
º¤ÅÍ·Î ¼±¾ðÇÑ´Ù.
ÀÌ ¼±¾ðµéÀº º¤ÅÍÀÇ Å©±â¿¡ ´ëÇØ ÀüÇô ¾Ë·ÁÁÖÁö ¾Ê°í 
( ±¸Çö¿¡ µû¶ó ±âº» º¤ÅÍ »çÀÌÁî°¡ ÀÖÀ» °ÍÀÌ´Ù. )
, ÇÊ¿ä¿¡ µû¶ó ¾ó¸¶µçÁö ´Ã·Á¼­ ¾µ ¼ö ÀÖ´Ù. 
</Para>

<Para>
±×·¯³ª ´ÙÀ½°ú °°ÀÌ ¼±¾ðÇÔÀ¸·Î½á Ãʱâ Å©±â¸¦ Á¤ÇØÁÙ ¼öµµ ÀÖ´Ù.
</Para>

<Para>

<ProgramListing>
vector&#60;char&#62; v4(26);
</ProgramListing>

</Para>

<Para>
ÀÌ´Â v4°¡ ¹®ÀÚ(char)ÀÇ º¤ÅÍ°¡ µÇ°í, óÀ½¿¡´Â 26°³ÀÇ ±ÛÀÚ¸¦ °¡Áú ¼ö ÀÖ´Ù´Â °ÍÀÌ´Ù.
¶ÇÇÑ, º¤ÅÍ ¾È¿¡ µé¾î°¡´Â ¼öµéÀ» ÃʱâÈ­ ÇÏ´Â ¹æ¹ýµµ Àִµ¥, ÀÌ´Â ´ÙÀ½°ú °°´Ù.
</Para>

<Para>

<ProgramListing>
vector&#60;float&#62; v5(100,1.0);
</ProgramListing>

</Para>

<Para>
À§ ¼±¾ðÀº <Emphasis remap="it">v5</Emphasis> °¡ 100°³ÀÇ 1.0À¸·Î ÃʱâÈ­ µÈ ½Ç¼ö°ªÀ» 
°®´Â º¤ÅÍÀÓÀ» ¼±¾ðÇÑ´Ù.
</Para>

</Sect3>

<Sect3>
<Title>º¤Å͸¦ üũÇϱâ </Title>

<Para>
Çѹø º¤Å͸¦ ¸¸µç ÈÄ¿¡´Â, <Emphasis remap="it">size</Emphasis> ÇÔ¼ö¸¦ ½á¼­ ÇöÀç
º¤ÅÍÀÇ Å©±â¸¦ ¾Ë¾Æ³¾ ¼ö ÀÖ´Ù.
ÀÌ ÇÔ¼ö´Â ¾Æ¹« ÀÎÀÚ ¾øÀÌ º¤ÅÍ¿¡ µé¾îÀÖ´Â ¿ø¼Ò ¼ö¸¦ ³ªÅ¸³»´Â integer¸¦ ¸®ÅÏÇÑ´Ù. 
( ¾ö¹ÐÇÏ°Ô ¸»ÇÏÀÚ¸é 
<Emphasis remap="it">size&lowbar;type</Emphasis> ŸÀÔÀÌ ¸®ÅϵÇÁö¸¸,
ÀÌ°ÍÀÌ ¹Ù·Î integer·Î ¹Ù²î¾îÁø´Ù )
±×·¸´Ù¸é ´ÙÀ½ÀÇ ÀÛÀº ÇÁ·Î±×·¥À¸·Î ¹«¾ùÀÌ Ãâ·ÂµÉ±î?
</Para>

<Para>

<ProgramListing>
&#60;vector-size.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;vector&#62;

using namespace std;

int main()
{
    vector&#60;int&#62; v1;
    vector&#60;int&#62; v2(10);
    vector&#60;int&#62; v3(10,7);

    cout &#60;&#60; "v1.size() returns " &#60;&#60; v1.size() &#60;&#60; endl;
    cout &#60;&#60; "v2.size() returns " &#60;&#60; v2.size() &#60;&#60; endl;
    cout &#60;&#60; "v3.size() returns " &#60;&#60; v3.size() &#60;&#60; endl;
}
</ProgramListing>

</Para>

<Para>
º¤ÅÍ°¡ ºñ¾ú´ÂÁö¸¦ üũÇϱâ À§Çؼ­´Â, empty ÇÔ¼ö¸¦ ¾²¸é µÈ´Ù.
À̰͵µ ¿ª½Ã ¾Æ¹« ÀÎÀÚ ¾øÀÌ boolean °ªÀ» ¸®ÅÏÇϴµ¥, ºñ¾îÀÖÀ¸¸é true¸¦,
ºñ¾îÀÖÁö ¾ÊÀ¸¸é false¸¦ ¸®ÅÏÇÑ´Ù.
±×·¸´Ù¸é ´ÙÀ½ÀÇ ÇÁ·Î±×·¥Àº ¹«¾ùÀ» ÇÁ¸°Æ®ÇÒ±î (true´Â 1·Î, false´Â 0À¸·Î ÇÁ¸°Æ®µÈ´Ù)?
</Para>

<Para>

<ProgramListing>
&#60;vector-empty.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;vector&#62;

using namespace std;

int main()
{
    vector&#60;int&#62; v1;
    vector&#60;int&#62; v2(10);
    vector&#60;int&#62; v3(10,7);

    cout &#60;&#60; "v1.empty() has value " &#60;&#60; v1.empty() &#60;&#60; endl;
    cout &#60;&#60; "v2.empty() has value " &#60;&#60; v2.empty() &#60;&#60; endl;
    cout &#60;&#60; "v3.empty() has value " &#60;&#60; v3.empty() &#60;&#60; endl;
}
</ProgramListing>

</Para>

</Sect3>

<Sect3>
<Title>º¤ÅÍÀÇ ¿ø¼Ò¿¡ Á¢±ÙÇϱâ</Title>

<Para>
º¤ÅÍÀÇ ¿ø¼Ò´Â &lsqb;]¿¬»êÀÚ¸¦ »ç¿ëÇؼ­ Á¢±ÙÇÒ ¼ö ÀÖ´Ù. µû¶ó¼­ ¸ðµç
¿ø¼Ò¸¦ ÇÁ¸°Æ®ÇÏ·Á¸é ´ÙÀ½°ú °°ÀÌ ÇÏ¸é µÈ´Ù.
</Para>

<Para>

<ProgramListing>
vector&#60;int&#62; v;
// ...
for (int i=0; i&#60;v.size(); i++)
     cout &#60;&#60; v[i];
</ProgramListing>

</Para>

<Para>
(ÀÌ´Â ¿ø·¡ÀÇ ¹è¿­À» »ç¿ëÇÏ´Â °Í°ú ¸Å¿ì ºñ½ÁÇÏ´Ù).
</Para>

<Para>
¶ÇÇÑ, &lsqb;] ¿¬»êÀÚ´Â º¤ÅÍ ¿ø¼ÒÀÇ °ªÀ» ¹Ù²Ù±â À§Çؼ­µµ ¾²ÀÏ ¼ö ÀÖ´Ù.
</Para>

<Para>

<ProgramListing>
vector&#60;int&#62; v;
// ...
for (int i=0; i&#60;v.size(); i++)
      v[i] = 2*i;
</ProgramListing>

</Para>

<Para>
front ÇÔ¼ö´Â º¤ÅÍÀÇ Ã¹¹ø° ¿ø¼Ò¸¦ ¸®ÅÏÇÑ´Ù.
</Para>

<Para>

<ProgramListing>
vector&#60;char&#62; v(10,'a');
// ...
char ch = v.front();
</ProgramListing>

</Para>

<Para>
¶ÇÇÑ, front¸¦ ÀÌ¿ëÇؼ­ ù¹ø° ¿ø¼ÒÀÇ °ªÀ» ¹Ù²Ü ¼öµµ ÀÖ´Ù.
</Para>

<Para>

<ProgramListing>
vector&#60;char&#62; v(10,'a');
// ...
v.front() = 'b';
</ProgramListing>

</Para>

<Para>
back ÇÔ¼ö´Â front¿Í °°Àº ¿ªÇÒÀ» ÇÏÁö¸¸, º¤ÅÍÀÇ ¸Ç ¸¶Áö¸· ¿ø¼Ò¸¦ ¸®ÅÏÇÏ´Â °ÍÀÌ
´Ù¸£´Ù.
</Para>

<Para>

<ProgramListing>
vector&#60;char&#62; v(10,'z');
// ...
char last = v.back();
v.back() = 'a';
</ProgramListing>

</Para>

<Para>
&lsqb;]¸¦ »ç¿ëÇÏ´Â °£´ÜÇÑ ¿¹Á¦¸¦ º¸ÀÚ.
</Para>

<Para>

<ProgramListing>
&#60;vector-access.cpp&#62;=
#include &#60;vector&#62;
#include &#60;iostream&#62;

using namespace std;

int main()
{
    vector&#60;int&#62; v1(5);
    int x;
    cout &#60;&#60; "Enter 5 integers (seperated by spaces):" &#60;&#60; endl;
    for (int i=0; i&#60;5; i++)
          cin &#62;&#62; v1[i];
    cout &#60;&#60; "You entered:" &#60;&#60; endl;
    for (int i=0; i&#60;5; i++)
          cout &#60;&#60; v1[i] &#60;&#60; ' ';
    cout &#60;&#60; endl;
}
</ProgramListing>

</Para>

</Sect3>

<Sect3>
<Title>º¤ÅÍÀÇ ¿ø¼Ò¸¦ Ãß°¡ / »èÁ¦Çϱâ </Title>

<Para>
À§¿¡ ¾ð±ÞµÈ &lsqb;] ¿Ü¿¡µµ, º¤ÅÍÀÇ ¿ø¼Ò¿¡ Á¢±ÙÇϰųª ¹Ù²Ü ¼ö ÀÖ´Â ¹æ¹ýÀÌ ¸î°¡Áö ´õ ÀÖ´Ù.
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
push&lowbar;backÀº »õ·Î¿î ¿ø¼Ò¸¦ º¤ÅÍÀÇ ³¡¿¡ ´õÇÒ °ÍÀÌ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
pop&lowbar;backÀº º¤ÅÍÀÇ ³¡¿¡¼­ ¿ø¼Ò¸¦ Çϳª ¾ø¾Ù °ÍÀÌ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
insert ´Â Çϳª ¶Ç´Â ¿©·¯°³ÀÇ ¿ø¼Ò¸¦ º¤ÅÍÀÇ ¿øÇÏ´Â À§Ä¡¿¡ »ðÀÔÇÒ °ÍÀÌ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
erase´Â Çϳª ¶Ç´Â ¿©·¯°³ÀÇ ¿ø¼Ò¸¦ ¿øÇÏ´Â À§Ä¡¿¡¼­ ¾ø¾Ù °ÍÀÌ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
±×·±µ¥ insert³ª erase´Â º¤ÅÍ¿¡¼­ ¿À¹öÇìµå°¡ Å« ¿¬»êÀÓ¿¡ ÁÖÀÇÇ϶ó. ¸¸¾à insert³ª erase¸¦
½á¾ßÇÑ´Ù¸é, º¤ÅÍ ´ë½Å list µ¥ÀÌÅͱ¸Á¶¸¦ »ç¿ëÇÏ´Â °ÍÀÌ ´õ È¿À²ÀûÀÏ °ÍÀÌ´Ù.
</Para>

<Para>

<ProgramListing>
&#60;vector-mod.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;vector&#62;

using namespace std;

int main()
{
    vector&#60;int&#62; v;

    for (int i=0; i&#60;10; i++) v.push_back(i);
    cout &#60;&#60; "Vector initialised to:" &#60;&#60; endl;
    for (int i=0; i&#60;10; i++) cout &#60;&#60; v[i] &#60;&#60; ' ' ;
    cout &#60;&#60; endl;

    for (int i=0; i&#60;3; i++) v.pop_back();
    cout &#60;&#60; "Vector length now: " &#60;&#60; v.size() &#60;&#60; endl;
    cout &#60;&#60; "It contains:" &#60;&#60; endl;
    for (int i=0; i&#60;v.size(); i++) cout &#60;&#60; v[i] &#60;&#60; ' ';
    cout &#60;&#60; endl;

    int a1[5];
    for (int i=0; i&#60;5; i++) a1[i] = 100;

    v.insert(&#38; v[3], &#38; a1[0],&#38; a1[3]);
    cout &#60;&#60; "Vector now contains:" &#60;&#60; endl;
    for (int i=0; i&#60;v.size(); i++) cout &#60;&#60; v[i] &#60;&#60; ' ';
    cout &#60;&#60; endl;

    v.erase(&#38; v[4],&#38; v[7]);
    cout &#60;&#60; "Vector now contains:" &#60;&#60; endl;
    for (int i=0; i&#60;v.size(); i++) cout &#60;&#60; v[i] &#60;&#60; ' ';
    cout &#60;&#60; endl;
}
</ProgramListing>

</Para>

<Para>
À§ÀÇ ¿¹¿¡¼­´Â º¤ÅÍ v°¡ ¼±¾ðµÈ ÈÄ, push_backÀ» »ç¿ëÇÏ¿© ÃʱâÈ­ µÇ¾ú´Ù.
±×¸®°í pop&lowbar;backÀ¸·Î µÚÀÇ ¸î ¿ø¼Ò°¡ ¾ø¾îÁ³°í,
¹è¿­ÀÌ Çϳª ¸¸µé¾îÁ®¼­ ±× ³»¿ëÀÌ insert¸¦ »ç¿ëÇؼ­ v¿¡ »ðÀԵǾú´Ù.
¸¶Áö¸·À¸·Î ¸î¸î ¿ø¼ÒµéÀ» Áö¿ì±â À§ÇØ erase°¡ »ç¿ëµÇ¾ú´Ù.
À§¿¡ »ç¿ëµÈ ÇÔ¼öµéÀº ´ÙÀ½°ú °°Àº ÀÎÀÚµéÀ» ¹Þ´Â´Ù.
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
      push&lowbar;back : vector¿¡ µé¾î°¡´Â °Í°ú °°Àº ŸÀÔÀÇ ÀÎÀÚ¸¦ Çϳª ¹Þ´Â´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
      pop&lowbar;back : ÀÎÀÚ¸¦ ¹ÞÁö ¾Ê´Â´Ù. ±×¸®°í ºó º¤ÅÍ¿¡ ´ëÇØ pop&lowbar;backÀ» ÇÏ¸é ¾ÈµÈ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
      insert ´Â ¼¼ °¡Áö ÇüÅ·Π¾²ÀδÙ.

<ItemizedList>
<ListItem>

<Para>
insert(pos, T&#38; x) : ¿ø¼Ò x Çϳª¸¦ pos°¡ °¡¸®Å°´Â À§Ä¡¿¡ »ðÀÔÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
insert(pos, start, end) : ´Ù¸¥ ÄÁÅ×ÀÌ³Ê ¾ÈÀÇ ³»¿ëÀ» pos°¡ °¡¸®Å°´Â À§Ä¡¿¡ »ðÀÔÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
»ðÀԵǴ ¿ø¼ÒµéÀº start¿¡¼­ ½ÃÀÛÇؼ­, end¸¦ ¸¸³¯ ¶§±îÁö (end°¡ °¡¸®Å°´Â °ÍÀº µé¾î°¡Áö ¾Ê´Â´Ù) ÀÌ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
insert(pos, int rep, T&#38; x) : rep °³ÀÇ x°ªÀ» pos À§Ä¡¿¡ »ðÀÔÇÑ´Ù. (°°Àº °ªÀ» ¿©·¯¹ø »ðÀÔ)
</Para>
</ListItem>

</ItemizedList>

</Para>
</ListItem>

</ItemizedList>

À§ÀÇ Äڵ忡 ³ª¿ÍÀÖµíÀÌ, pos°¡ °¡¸®Å°´Â Æ÷Áö¼Ç °ªÀº ¿ø¼Ò°¡ »ðÀ﵃ °÷ÀÇ ÁÖ¼Ò¿©¾ß ÇÑ´Ù.
¸¶Âù°¡Áö·Î start¿Í endµµ ÁÖ¼Ò°ªÀ̾î¾ß ÇÑ´Ù. (»ç½Ç ÀÌ°ÍÀº À̵éÀÌ iteratorÀ̱⠶§¹®ÀÌ´Ù.
ÀÌ¿¡ ´ëÇؼ­´Â ´ÙÀ½ Àå¿¡¼­ ´õ »ìÆ캼 °ÍÀÌ´Ù.)

<ItemizedList>
<ListItem>

<Para>
erase´Â µÎ °¡Áö ÇüÅ·Π¾²Àδ٠(pos, start¿Í end´Â insert¿Í °°Àº Çü½ÄÀ» °®´Â´Ù)

<ItemizedList>
<ListItem>

<Para>
 erase(pos) : pos°¡ °¡¸®Å°´Â À§Ä¡ÀÇ ¿ø¼Ò¸¦ ¾ø¾Ø´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 erase(start,end) : start¿¡¼­ end±îÁö(end´Â Æ÷ÇÔÇÏÁö ¾ÊÀ½)¿¡ ÇØ´çÇÏ´Â ¿ø¼ÒµéÀ» ¾ø¾Ø´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect3>

<Sect3>
<Title>Vector Iterator</Title>

<Para>
º¤ÅÍ vÀÇ ¿ø¼ÒµéÀ» Â÷·Ê´ë·Î º¸´Â °¡Àå ½¬¿î ¹æ¹ýÀº À§¿¡ ÇÑ ¹æ¹ý°°ÀÌ ÇÏ´Â °ÍÀÌ´Ù.
</Para>

<Para>

<ProgramListing>
for (int i=0; i&#60;v.size(); i++) { ... v[i] ... }
</ProgramListing>

</Para>

<Para>
¶Ç´Ù¸¥ ¹æ¹ýÀº ¹Ù·Î iterator¸¦ ÀÌ¿ëÇÏ´Â °ÍÀÌ´Ù. iterator´Â ÄÁÅ×À̳ÊÀÇ Æ÷ÀÎÅͶó°í »ý°¢Çϸé
µÈ´Ù. µû¶ó¼­ À̸¦ Áõ°¡½ÃÅ°¸é¼­ ¿ø¼Ò¸¦ Çϳª¾¿ Á¢±ÙÇÏ´Â °ÍÀÌ °¡´ÉÇÏ´Ù.
º¤ÅÍ°¡ ¾Æ´Ñ ÄÁÅ×À̳ÊÀÇ °æ¿ì´Â iterator°¡ ¿ø¼Ò¸¦ Â÷·Ê´ë·Î Á¢±ÙÇÒ ¼ö ÀÖ´Â À¯ÀÏÇÑ ¹æ¹ýÀÌ´Ù.
</Para>

<Para>
type TÀÇ ¿ø¼Ò¸¦ °®°í ÀÖ´Â º¤ÅÍÀÇ °æ¿ì :
</Para>

<Para>

<ProgramListing>
vector&#60;T&#62; v;
</ProgramListing>

</Para>

<Para>
iterator´Â ´ÙÀ½°ú °°ÀÌ ¼±¾ðµÈ´Ù.
</Para>

<Para>

<ProgramListing>
vector&#60;T&#62;::iterator i;
</ProgramListing>

</Para>

<Para>
ÀÌ·¯ÇÑ iterator´Â begin()À̳ª end()°°Àº ÇÔ¼ö¿¡ ÀÇÇØ ¸®ÅϵǴ °ªÀ¸·Î ¸¸µé¾îÁø´Ù.
°°Àº ŸÀÔÀÇ iteratorµéÀº == ³ª != ·Î ºñ±³°¡´ÉÇÏ°í, ++À» ÀÌ¿ëÇÑ Áõ°¡³ª *¸¦ ÀÌ¿ëÇÑ 
ÂüÁ¶ µîÀÌ °¡´ÉÇÏ´Ù.
&lsqb; ÀÌ ¿Ü¿¡µµ º¤ÅÍ iterator´Â ´õ ¸¹Àº ¿¬»êÀÚ¸¦ °®°í ÀÖ´Ù. ÀÌ¿¡ ´ëÇؼ­´Â ´ÙÀ½ ÀåÀ» Âü°íÇضó ].
</Para>

<Para>
´ÙÀ½Àº iterator¸¦ ¾î¶»°Ô º¤ÅÍ¿Í »ç¿ëÇÏ´Â Áö¿¡ ´ëÇÑ ¿¹Á¦ÀÌ´Ù.
</Para>

<Para>

<ProgramListing>
&#60;vector-iterator.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;vector&#62;

using namespace std;

int main()
{
    vector&#60;int&#62; v(10);

    int j = 1;

    vector&#60;int&#62;::iterator i;

    // v¸¦ 1¿¡¼­ 10±îÁöÀÇ Á¤¼ö·Î ä¿î´Ù.
    i = v.begin();
    while (i != v.end())
    {
        *i = j;
        j++;
        i++;
    }

    // vÀÇ °¢ ¿ø¼Ò¸¦ Á¦°öÇÑ´Ù.
    for (i=v.begin(); i!=v.end(); i++) *i = (*i) * (*i);

    // vÀÇ ³»¿ëÀ» Ãâ·ÂÇÑ´Ù.
    cout &#60;&#60; "The vector v contains: ";
    for (i=v.begin(); i!=v.end(); i++) cout &#60;&#60; *i &#60;&#60; ' ';
    cout &#60;&#60; endl;

}
</ProgramListing>

</Para>

<Para>
*i °¡ µîÈ£ÀÇ ¿ÞÂÊ(LHS)¿¡¼­´Â °ªÀ» º¯°æÇϱâ À§ÇØ, ¿À¸¥ÂÊ(RHS)¿¡¼­´Â °ªÀ» ÂüÁ¶Çϱâ À§ÇØ
¾²ÀÎ °Í¿¡ ÁÖ¸ñÇضó.
</Para>

</Sect3>

<Sect3>
<Title>º¤ÅÍÀÇ ºñ±³</Title>

<Para>
µÎ °³ÀÇ º¤Å͸¦ ==¿Í &#60;¸¦ ÀÌ¿ëÇؼ­ ºñ±³ÇÒ ¼ö ÀÖ´Ù. ==´Â ¾ç ÂÊÀÇ º¤ÅÍ°¡ °°Àº ¼öÀÇ
¿ø¼Ò¸¦ °®°í ´ëÀÀµÇ´Â °¢¿ø¼ÒµéÀÌ ¸ðµÎ °°À» ¶§ true¸¦ ¸®ÅÏÇÒ °ÍÀÌ´Ù.
&#60;Àº µÎ º¤ÅÍÀÇ ¿ø¼ÒµéÀ» Â÷·Ê´ë·Î »çÀü¼ø¼­(lexicographical order)´ë·Î ºñ±³ÇÑ´Ù.
¿¹¸¦µé¾î v1°ú v2¸¦ ºñ±³ÇÑ´Ù°í Çغ¸ÀÚ (v1 &lt; v2).
i=0À̶ó ÇÒ ¶§, v1&lsqb;i] &lt; v2&lsqb;i] À̸é true¸¦ ¸®ÅÏÇÏ°í, v1&lsqb;i] &gt;
v2&lsqb;i] À̸é false¸¦ ¸®ÅÏÇÑ´Ù. ¸¸¾à µÑÀÌ °°À¸¸é i¸¦ Áõ°¡½ÃŲ´Ù (Áï, ´ÙÀ½ ¿ø¼Ò·Î ³Ñ¾î°£´Ù). ¸¸¾à v1ÀÇ ³¡ÀÌ v2°¡ ³¡³ª±â Àü¿¡ ³ªÅ¸³µ´Ù¸é (Áï, v1ÀÇ ¿ø¼ÒÀÇ °³¼ö°¡ ´õ ÀÛ°í,
v1ÀÌ v2ÀÇ ¾ÕºÎºÐ°ú ³»¿ëÀÌ °°À» ¶§) true¸¦ ¸®ÅÏÇÏ°í, ±×·¸Áö ¾ÊÀ¸¸é false¸¦ ¸®ÅÏÇÑ´Ù.
´ÙÀ½ÀÇ ¿¹¸¦ º¸ÀÚ.
</Para>

<Para>

<ProgramListing>
(1,2,3,4) &#60; (5,6,7,8,9,10) ´Â false.
(1,2,3) &#60; (1,2,3,4) ´Â true
(1,2,3,4) &#60; (1,2,3) ´Â false
(0,1,2,3) &#60; (1,2,3) ´Â true
</ProgramListing>

</Para>

<Para>
¾Æ·¡ÀÇ ÄÚµå´Â À§¿¡¼­ ¼¼¹ø° ¿¹¸¦ º¸¿©ÁØ´Ù.
</Para>

<Para>

<ProgramListing>
&#60;vector-comp.cpp&#62;=
#include &#60;vector&#62;
#include &#60;iostream&#62;

using namespace std;

int main()
{
    vector&#60;int&#62; v1;
    vector&#60;int&#62; v2;
    for (int i=0; i&#60;4; i++) v1.push_back(i+1);
    for (int i=0; i&#60;3; i++) v2.push_back(i+1);

    cout &#60;&#60; "v1: ";
    for (int i=0; i&#60;v1.size(); i++) cout &#60;&#60; v1[i] &#60;&#60; ' ';
    cout &#60;&#60; endl;

    cout &#60;&#60; "v2: ";
    for (int i=0; i&#60;v2.size(); i++) cout &#60;&#60; v2[i] &#60;&#60; ' ';
    cout &#60;&#60; endl;

    cout &#60;&#60; "v1 &#60; v2 is: " &#60;&#60; (v1&#60;v2 ? "true" : "false") &#60;&#60; endl;
}
</ProgramListing>

&#60;= ¿Í &#62;= ¿ª½Ã ¿¹»óÇÏ´Â ´ë·Î µ¿ÀÛÇÒ °ÍÀÌ´Ù.
</Para>

</Sect3>

</Sect2>

<Sect2>
<Title>Iterator ¿Í STL</Title>

<Para>
<XRef LinkEnd="stlref">ÀåÀ» ºÁ¶ó.
</Para>

</Sect2>

<Sect2>
<Title>¸®½ºÆ®</Title>

<Para>
<XRef LinkEnd="stlref">ÀåÀ» ºÁ¶ó.
</Para>

</Sect2>

<Sect2>
<Title>ÁýÇÕ(Set)</Title>

<Para>
set ÄÁÅ×ÀÌ³Ê Å¸ÀÔÀº º¤ÅÍ°°ÀÌ À妽º¸¦ ÅëÇØ ¿ø¼Ò¿¡ Á¢±ÙÇÏ´Â °ÍÀÌ ¾Æ´Ï¶ó, ¿ø¼Ò¸¦ Á÷Á¢ ÀúÀåÇÏ°í
»¬ ¼ö ÀÖµµ·Ï ÇØÁØ´Ù. set ÄÁÅ×À̳ʴ ¼­·Î ´Ù¸¥ ¿ø¼Òµé¸¸À» °®´Â ¼öÇÐÀûÀÎ ÁýÇÕ°ú °°ÀÌ µ¿ÀÛÇÑ´Ù.
±×·¯³ª, ¼öÇÐÀûÀÎ ÁýÇÕ°ú´Â ´Ù¸£°Ô, ÁýÇÕ ¾ÈÀÇ ¿ø¼ÒµéÀº (»ç¿ëÀÚ°¡ ÁöÁ¤ÇÏ´Â) ¾î¶² ¼ø¼­ ´ë·Î
ÀúÀåµÇ°Ô µÈ´Ù. ½ÇÁ¦·Î ÀÌ°ÍÀº set ÄÁÅ×À̳ʷΠ¼öÇÐÀûÀÎ ÁýÇÕÀ» ±¸ÇöÇÏ´Â µ¥ ÀÖ¾î ÀÛÀº Á¦ÇÑÀÏ
»ÓÀÌ°í, ÀÌ·¸°Ô ÇÔÀ¸·Î½á ¼ø¼­°¡ ¾ø´Â °Íº¸´Ù ¸¹Àº ¿¬»ê¿¡¼­ ´õ È¿À²ÀûÀÌ µÉ ¼ö ÀÖ´Ù.
</Para>

<Sect3>
<Title>SetÀ» ¸¸µé±â</Title>

<Para>
set ÄÁÅ×À̳ʸ¦ ¸¸µé±â À§Çؼ­´Â µÎ °¡Áö template ÀÎÀÚ°¡ ÇÊ¿äÇÏ´Ù - ÀÌ´Â setÀÌ °®°Ô µÉ
¿ø¼ÒµéÀÇ Å¸ÀÔ°ú µÎ ¿ø¼Ò¸¦ ºñ±³ÇÒ ¼ö ÀÖ´Â ºñ±³ÇÔ¼ö function objectÀÇ Å¸ÀÔÀÌ´Ù.
</Para>

<Para>

<ProgramListing>
set&#60;T, Compare&#62; s;
</ProgramListing>

</Para>

<Para>
(<Emphasis remap="it">set &lt; T &gt; s</Emphasis>¿Í °°Àº ¼±¾ðµµ °¡´ÉÇؾßÇÑ´Ù.
 ÀÌ´Â µÎ¹ø° ÀÎÀڷμ­ µðÆúÆ® template ÀÎÀÚÀÎ less &lt; T &gt;¸¦ »ç¿ëÇÑ´Ù.
 ÇÏÁö¸¸ ¸¹Àº C++ ÄÄÆÄÀÏ·¯ (g++Æ÷ÇÔ)°¡ ±âº» template ÀÎÀÚ¸¦ Áö¿øÇÏÁö ¸øÇÏ°í ÀÖ´Ù.)
</Para>

<Para>
°£´ÜÇÑ Å¸ÀÔ <Emphasis remap="bf">T</Emphasis> ¿¡ ´ëÇؼ­´Â <Emphasis remap="it">less &lt; T &gt; </Emphasis> function object¸¦ ¾µ ¼öµµ ÀÖ´Ù.
( "function object"°¡ ¹«¾ùÀΰ¡ ÇÏ´Â °í¹ÎÀº ÇÒÇÊ¿ä ¾ø´Ù.)
¿¹¸¦µé¾î ¾Æ·¡¿Í °°ÀÌ ¼±¾ðÇÏ¸é µÈ´Ù.
</Para>

<Para>

<ProgramListing>
set&#60;int, less&#60;int&#62; &#62; s1;
set&#60;double, less&#60;double&#62; &#62; s2;
set&#60;char, less&#60;char&#62; &#62; s3;
set&#60;string, less&#60;string&#62; &#62; s4;
</ProgramListing>

</Para>

<Para>
( ¼±¾ðÇÒ ¶§ µÚÂÊÀÇ &#62; µÎ °³°¡ space·Î ¶ç¾îÁ® ÀÖÀ½¿¡ ÁÖÀÇÇ϶ó. ÀÌ´Â compiler°¡ &#62;¸¦
 ½¬ÇÁÆ® ¿¬»êÀÚ(&#62;&#62;) ¿Í ±¸º°Çϱâ À§ÇØ ²À ÇÊ¿äÇÑ °ÍÀÌ´Ù.)
 °¢°¢ÀÇ °æ¿ì function objectµéÀº °¢°¢ÀÇ Å¸ÀÔ¿¡ ¸Â°Ô &lt;¸¦ »ç¿ëÇÒ °ÍÀÌ´Ù.
 (ÀÌ´Â °¢°¢
<Emphasis remap="it">int, double, char, string</Emphasis> ŸÀÔÀÌ´Ù. )
</Para>

<Para>
¾Æ·¡ÀÇ ÄÚµå´Â Á¤¼ö(int)ÀÇ setÀ» ¼±¾ðÇÏ°í, <Emphasis remap="it">insert</Emphasis>
¸Þ½îµå¸¦ »ç¿ëÇÏ¿© Á¤¼ö¸¦ ¸î°³ Ãß°¡ÇÑ´Ù.
±×¸®°í setÀ» Â÷·Ê´ë·Î º¸¸é¼­ ¿ø¼ÒµéÀ» Ãâ·ÂÇÑ´Ù.
Àç¹ÌÀÖ´Â °ÍÀº Ãß°¡ÇÏ´Â ¼ø¼­°¡ ¾î¶² ¼ø¼­À̵çÁö setÀÇ ³»¿ëÀº Á¤·ÄµÈ »óÅ·ΠÃâ·ÂµÈ´Ù´Â
°ÍÀÌ´Ù.
</Para>

<Para>

<ProgramListing>
&#60;set-construct1.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;set&#62;

using namespace std;

int main()
{
    set&#60;int, less&#60;int&#62; &#62; s;
    set&#60;int, less&#60;int&#62; &#62;::iterator i;

    s.insert(4);
    s.insert(0);
    s.insert(-9);
    s.insert(7);
    s.insert(-2);
    s.insert(4);
    s.insert(2);

    cout &#60;&#60; "The set contains the elements: ";
    for (i=s.begin(); i!=s.end(); i++) cout &#60;&#60; *i &#60;&#60; ' ';
    cout &#60;&#60; endl;
}
</ProgramListing>

</Para>

<Para>
4°¡ µÎ¹ø Ãß°¡µÇ¾úÀ½¿¡µµ ºÒ±¸ÇÏ°í, Çѹø¹Û¿¡ ³ª¿ÀÁö ¾Ê´Â °Í¿¡ ÁÖÀÇÇضó.
ÀÌ´Â ÁýÇÕÀ̱⠶§¹®¿¡ ´ç¿¬ÇÑ °ÍÀÌ´Ù.
</Para>

</Sect3>

<Sect3>
<Title>Function Objects¶õ ¹«¾ùÀΰ¡?</Title>

<Para>
C++ÀÇ ¸ÚÁø Ư¡ Áß Çϳª´Â ¿¬»êÀÚÀÇ ¿À¹ö·ÎµùÀÌ´Ù. µû¶ó¼­ »õ·Î ¸¸µé¾îÁø class¿¡ ´ëÇØ
 + °¡ ¾î¶² Àǹ̵çÁö °®µµ·Ï ÇÒ ¼ö ÀÖ´Ù. ±×·±µ¥, C++¿¡¼­ ¿À¹ö·Îµå ÇÒ ¼ö ÀÖ´Â ¿¬»êÀÚ Áß
 ÇÔ¼ö È£Ãâ ¿¬»êÀÚÀÎ ()°¡ ÀÖ°í, ÀÌ´Â classÀÇ ÀνºÅϽº°¡ ÇÔ¼ö¿Í °°ÀÌ µ¿ÀÛÇÒ ¼ö ÀÖµµ·Ï
 ÇØÁÙ ¼ö ÀÖ´Ù. ÀÌ°ÍÀÌ function objectÀÌ´Ù.
</Para>

<Para>
°£´ÜÇÑ ¿¹Á¦¸¦ º¸ÀÚ.
</Para>

<Para>

<ProgramListing>
&#60;function-object.cpp&#62;=
#include &#60;iostream&#62;

using namespace std;

template&#60;class T&#62;
class square {
public:
    T operator()(T x) { return x*x; }
};
// ÀÌ´Â *°¡ Á¤ÀǵǴ ¾î¶² T¿¡ ´ëÇؼ­µçÁö ¾²ÀÏ ¼ö ÀÖ´Ù.

int main()
{
    // function object¸¦ ¸¸µç´Ù.
    square&#60;double&#62; f1;
    square&#60;int&#62; f2;

    // À̸¦ »ç¿ëÇÑ´Ù.
    cout &#60;&#60; "5.1^2 = " &#60;&#60; f1(5.1) &#60;&#60; endl;
    cout &#60;&#60; "100^2 = " &#60;&#60; f2(100) &#60;&#60; endl;

    // ¾Æ·¡ÀÇ ³»¿ëÀº ÄÄÆÄÀÏ ¿¡·¯¸¦ Ãâ·ÂÇÒ °ÍÀÌ´Ù.
    // cout &#60;&#60; "100.1^2 = " &#60;&#60; f2(100.1) &#60;&#60; endl;
}
</ProgramListing>

</Para>

<Para>
function object´Â STLÀÇ ¸î¸î ºÎºÐ, ƯÈ÷ set°ú map¿¡¼­ ¸¹ÀÌ ¾²ÀδÙ.
</Para>

<Para>
function object°¡ ÇÊ¿äÇÑ °æ¿ì¸¦ »ý°¢Çغ¸ÀÚ.
¾Æ·¡ÀÇ ³»¿ëÀ» ¸¸Á·ÇÏ´Â <Emphasis remap="it">comp</Emphasis>¶ó´Â °ÍÀ» »ý°¢Çغ¸ÀÚ.
</Para>

<Para>

<OrderedList>
<ListItem>

<Para>
¸¸¾à comp(x,y), comp(y,z)°¡ trueÀ̸é, comp(x,z)µµ ¿ª½Ã trueÀÌ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 comp(x,x)´Â ¾ðÁ¦³ª falseÀÌ´Ù.
</Para>
</ListItem>

</OrderedList>

</Para>

<Para>
¾î¶² x,y¿¡ ´ëÇØ comp(x,y)¿Í comp(y,x)°¡ falseÀ̸é x¿Í y´Â °°Àº °´Ã¼ÀÌ´Ù.
</Para>

<Para>
ÀÌ´Â ¼ýÀÚ¿¡¼­ <Emphasis remap="it">¹Ì¸¸</Emphasis>°ü°è ( &lt; )¸¦ ³ªÅ¸³½´Ù.
À§¿¡¼­ ¾²ÀÎ less &lt; T &gt; function object ´Â type T¿¡ ´ëÇØ &lt; ¿¬»êÀÚ·Î Á¤ÀǵǾî
ÀÖ´Ù. Áï, ´ÙÀ½°ú °°´Ù.
</Para>

<Para>

<ProgramListing>
template&#60;class T&#62;
struct less {
  bool operator()(T x, T y) { return x&#60;y; }
}
</ProgramListing>

</Para>

<Para>
(ÁøÂ¥ Á¤ÀÇ´Â ·¹ÆÛ·±½º¸¦ »ç¿ëÇÏ°í, ÀûÀýÇÑ const ¼±¾ðÀ» »ç¿ëÇϸç binary&lowbar;function template class¸¦ »ó¼Ó¹Þ´Â´Ù.)
</Para>

<Para>
ÀÌ´Â ¸¸¾à T°¡ &lt; ¿¬»êÀÚ¸¦ ±× ŸÀÔ¿¡ ´ëÇØ Á¤ÀÇÇسõ¾Ò´Ù¸é, 
T ŸÀÔÀÇ ÁýÇÕÀ» ¼±¾ðÇÒ ¶§, ºñ±³¸¦ À§ÇÑ °ÍÀ¸·Î less &lt; T &gt; ¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù´Â
°ÍÀÌ´Ù.
¸¸¾à &lt; ¿¬»êÀÚ°¡ ÇÏ°íÀÚ ÇÏ´Â °Í°ú ¸ÂÁö ¾ÊÀ» ¼öµµ ÀÖ´Ù. ÀÌ·² ¶§´Â ´Ù¸¥ ¿¹°¡ ÀÖ´Ù.
ÀÌ´Â &lt; ¿¬»êÀÚ¸¦ ÀÌ¿ëÇÏ¿© °£´ÜÇÑ class¸¦ ¸¸µé°í, ´Ù¸¥ ¹æ½ÄÀÇ ºñ±³¸¦ ÇÏ´Â
function object¸¦ ¸¸µç´Ù. ¿À¹ö·Îµù µÈ &lt;¿Í () ¿¬»êÀÚ°¡ STL°ú Àß µ¹¾Æ°¡±â À§Çؼ­´Â
const ¸¦ Àû´çÈ÷ ½áÁà¾ß ÇÑ´Ù´Â °Í¿¡ ÁÖÀÇÇ϶ó.
</Para>

<Para>

<ProgramListing>
&#60;set-construct2.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;set&#62;

using namespace std;

// ÀÌ class´Â µÎ °³ÀÇ ¸â¹ö º¯¼ö¸¦ °®´Â´Ù.
// ¿À¹ö·ÎµùµÈ &#60;Àº ¸â¹ö f1°ªÀ» °®°í µÎ class¸¦ ºñ±³ÇÑ´Ù.
class myClass {
private:
    int f1;
    char f2;
public:
    myClass(int a, char b) : f1(a), f2(b) {}
    int field1() const { return f1; }
    char field2() const { return f2; }
    bool operator&#60;(myClass y) const
    { return (f1&#60;y.field1()); }
};

// ÀÌ function object´Â ¸â¹ö f2ÀÇ °ªÀ» ±âÃÊ·Î
// myClass ŸÀÔÀÇ °´Ã¼µéÀ» ºñ±³ÇÑ´Ù.
class comp_myClass {
public:
    bool operator()(myClass c1, myClass c2) const
    { return (c1.field2() &#60; c2.field2()); }
};

int main()
{
    set&#60;myClass, less&#60;myClass&#62; &#62; s1;
    set&#60;myClass, less&#60;myClass&#62; &#62;::iterator i;
    set&#60;myClass, comp_myClass&#62; s2;
    set&#60;myClass, comp_myClass&#62;::iterator j;

    s1.insert(myClass(1,'a'));
    s2.insert(myClass(1,'a'));
    s1.insert(myClass(1,'b'));
    s2.insert(myClass(1,'b'));
    s1.insert(myClass(2,'a'));
    s2.insert(myClass(2,'a'));

    cout &#60;&#60; "Set s1 contains: ";
    for (i=s1.begin(); i!=s1.end(); i++)
    { 
        cout &#60;&#60; "(" &#60;&#60; (*i).field1() &#60;&#60; "," 
                &#60;&#60; (*i).field2() &#60;&#60; ")" &#60;&#60; ' ';
    }
    cout &#60;&#60; endl;

    cout &#60;&#60; "Set s2 contains: ";
    for (j=s2.begin(); j!=s2.end(); j++)
    {
        cout &#60;&#60; "(" &#60;&#60; (*j).field1() &#60;&#60; "," 
                &#60;&#60; (*j).field2() &#60;&#60; ")" &#60;&#60; ' ';
    }
    cout &#60;&#60; endl;
}
</ProgramListing>

</Para>

<Para>
(1,a)¿Í (2,a)¸¦ °¡Áø ÁýÇÕ s1Àº f1À» ±âÁØÀ¸·Î ºñ±³¸¦ ÇÑ´Ù. µû¶ó¼­ (1,a)¿Í (1,b)´Â
°°Àº ¿ø¼Ò·Î Ãë±ÞµÈ´Ù. (1,a)¿Í (1,b)¸¦ °¡Áø ÁýÇÕ s2´Â f2¸¦ ±âÁØÀ¸·Î ºñ±³¸¦ Çϱ⠶§¹®¿¡
(1,a)¿Í (2,a)°¡ °°Àº ¿ø¼Ò·Î Ãë±ÞµÈ´Ù.
</Para>

</Sect3>

<Sect3>
<Title>Ãâ·ÂÇϱâ</Title>

<Para>
À§ÀÇ ¿¹¿¡¼­ ÁýÇÕÀÇ ³»¿ëÀ» Ãâ·ÂÇÏ´Â °ÍÀº º°·Î ÁÁÁö ¾Ê´Ù.
¾Æ·¡ÀÇ Çì´õÆÄÀÏÀº <Emphasis remap="it">operator&#60;&#60; </Emphasis>À» ¿À¹ö·ÎµùÇÏ´Â
°£´ÜÇÑ Ç¥ÇöÀ» °®°í ÀÖ´Ù.
ÀÌ´Â °£´ÜÇÑ ¿ø¼Ò ŸÀÔÀ» °®´Â ÀÛÀº ÁýÇÕ¿¡¼­´Â Àß µ¿ÀÛÇÑ´Ù.
</Para>

<Para>

<ProgramListing>
&#60;printset.h&#62;=
#ifndef _PRINTSET_H
#define _PRINTSET_H

#include &#60;iostream&#62;
#include &#60;set&#62;

template&#60;class T, class Comp&#62;
std::ostream&#38; operator&#60;&#60;(std::ostream&#38; os, const std::set&#60;T,Comp&#62;&#38; s)
{
    std::set&#60;T,Comp&#62;::iterator iter = s.begin();
    int sz = s.size();
    int cnt = 0;

    os &#60;&#60; "{";
    while (cnt &#60; sz-1)
    {
        os &#60;&#60; *iter &#60;&#60; ",";
        iter++;
        cnt++;
    }
    if (sz != 0) os &#60;&#60; *iter;
    os &#60;&#60; "}";

    return os;
}
#endif
</ProgramListing>

</Para>

<Para>
¿©±â¼­ Ãâ·ÂÀ» À§ÇØ »ç¿ëÇÑ &#60;&#60; ¿ë¹ýÀº ÁýÇÕÀÇ ¿ø¼ÒµéÀÌ &#60;&#60; ¿¬»êÀÚ¸¦ »ç¿ëÇÒ ¼ö
ÀÖµµ·Ï Á¤ÀǵǾîÀÖ´Ù°í °¡Á¤ÇÑ °ÍÀÌ´Ù. 
±×·¡¼­ À̸¦ ÄÞ¸¶(,)·Î ±¸ºÐÇÏ°í ´ë°ýÈ£·Î µÑ·¯½Î¼­ Ãâ·ÂµÇµµ·Ï ÇÑ °ÍÀÌ´Ù.
ÀÌ´Â ´ÙÀ½ ¿¹¿¡¼­µµ »ç¿ëµÉ °ÍÀÌ´Ù.
</Para>

</Sect3>

<Sect3>
<Title>¿ø¼ÒÀÇ ¼ö ±¸Çϱâ</Title>

<Para>
ÁýÇÕÀÌ °øÁýÇÕÀÎÁö´Â empty() ¸Þ½îµå¸¦ »ç¿ëÇÏ¿© ¾Ë ¼ö ÀÖ´Ù. ÁýÇÕ¿¡ ¸î°³ÀÇ ¿ø¼Ò°¡
µé¾îÀÖ´ÂÁö´Â size() ¸Þ½îµå¸¦ »ç¿ëÇÏ¿© ¾Ë ¼ö ÀÖ´Ù.
À̵éÀº ÀÎÀÚ¾øÀÌ ºÒ·Á¼­ °¢°¢ true ³ª false  ȤÀº Á¤¼ö(int)¸¦ ¸®ÅÏÇÑ´Ù.
</Para>

<Para>

<ProgramListing>
&#60;set-size.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;set&#62;
#include "printset.h"

using namespace std;

int main()
{
    set&#60;int, less&#60;int&#62; &#62; s;

    cout &#60;&#60; "The set s is  "
            &#60;&#60; (s.empty() ? "empty." : "non-empty.") &#60;&#60; endl; 
    cout &#60;&#60; "It has " &#60;&#60; s.size() &#60;&#60; "elements." &#60;&#60; endl;

    cout &#60;&#60; "Now adding some elements... " &#60;&#60; endl;

    s.insert(1);
    s.insert(6);
    s.insert(7);
    s.insert(-7);
    s.insert(5);
    s.insert(2);
    s.insert(1);
    s.insert(6);

    cout &#60;&#60; "The set s is now  
            &#60;&#60; (s.empty() ? "empty." : "non-empty.") &#60;&#60; endl;
    cout &#60;&#60; "It has " &#60;&#60; s.size() &#60;&#60; "elements." &#60;&#60; endl;
    cout &#60;&#60; "s = " &#60;&#60; s &#60;&#60; endl;
}
</ProgramListing>

</Para>

</Sect3>

<Sect3>
<Title>ÁýÇÕÀÌ ¼­·Î °°ÀºÁö °Ë»çÇϱâ</Title>

<Para>
µÎ ÁýÇÕÀÌ ¼­·Î °°ÀºÁö´Â == ¿¬»êÀÚ¸¦ »ç¿ëÇÏ¿© °Ë»çÇÒ ¼ö ÀÖ´Ù. ÀÌ´Â
T::operator== ¸¦ »ç¿ëÇÏ¿© °¢ ¿ø¼Ò¸¦ Â÷·Ê´ë·Î °Ë»çÇÔÀ¸·Î½á ÀÌ·ç¾îÁø´Ù.
</Para>

<Para>

<ProgramListing>
&#60;set-equality.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;set&#62;
#include "printset.h"

using namespace std;

int main()
{
    set&#60;int, less&#60;int&#62; &#62; s1, s2 ,s3;

    for (int i=0; i&#60;10; i++)
    {
        s1.insert(i);
        s2.insert(2*i);
        s3.insert(i);
    }

    cout &#60;&#60; "s1 = " &#60;&#60; s1 &#60;&#60; endl;
    cout &#60;&#60; "s2 = " &#60;&#60; s2 &#60;&#60; endl;
    cout &#60;&#60; "s3 = " &#60;&#60; s3 &#60;&#60; endl;
    cout &#60;&#60; "s1==s2 is: " &#60;&#60; (s1==s2 ? true. : false.) &#60;&#60; endl;
    cout &#60;&#60; "s1==s3 is: " &#60;&#60; (s1==s3 ? true. : false.) &#60;&#60; endl;
}
</ProgramListing>

</Para>

<Para>
¶ÇÇÑ, µÎ ÁýÇÕÀ» &#60;À¸·Î ºñ±³ÇÏ´Â °Íµµ °¡´ÉÇÏ´Ù. s1 &#60; s2 ´Â s1ÀÌ »çÀü¼ø¼­·Î(lexicographically) s2º¸´Ù ÀÛÀ¸¸é true, ±×·¸Áö ¾ÊÀ¸¸é falseÀÌ´Ù.
</Para>

</Sect3>

<Sect3>
<Title>¿ø¼Ò¸¦ Ãß°¡Çϰųª »èÁ¦Çϱâ</Title>

<Para>
ÁýÇÕ¿¡ ¿ø¼Ò¸¦ Ãß°¡ÇÏ´Â °ÍÀº insert ¸Þ½îµå (À§¿¡ »ç¿ëÇÑ °Í°ú °°ÀÌ)¸¦, »èÁ¦ÇÏ´Â °ÍÀº erase ¸Þ½îµå¸¦ ÅëÇØ ÀÌ·ç¾îÁø´Ù.
</Para>

<Para>
ŸÀÔ TÀÇ ¿ø¼ÒµéÀ» °®°í ÀÖ´Â ÁýÇÕÀÇ °æ¿ì, ´ÙÀ½°ú °°ÀÌ ÀÌ·ç¾îÁø´Ù :

<ItemizedList>
<ListItem>
<Para>
 <Emphasis remap="bf">pair &lt; iterator, bool&#62; insert(T&#38; x)</Emphasis>. 
 À̴ ǥÁØ insert ÇÔ¼öÀÌ´Ù. ¸®ÅÏ°ªÀº ¹«½ÃÇÒ¼öµµ ÀÖ°í, ¼º°øÀûÀ¸·Î Ãß°¡Çß´ÂÁö¸¦ ¾Ë±â À§ÇØ
 »ç¿ëÇÒ ¼öµµ ÀÖ´Ù (°°Àº ¿ø¼Ò°¡ ÀÌ¹Ì ÁýÇÕ¿¡ ÀÖÀ» °æ¿ì ½ÇÆÐÇÑ´Ù).
 ¸¸¾à Ãß°¡°¡ ¼º°øÇß´Ù¸é, bool °ªÀº trueÀÌ°í, 
 iterator´Â ±Ý¹æ Ãß°¡µÈ ¿ø¼Ò¸¦ °¡¸®Å°°Ô µÉ °ÍÀÌ´Ù.
 ¸¸¾à ¿ø¼Ò°¡ ÀÌ¹Ì Á¸ÀçÇÏ´Â °ÍÀ̶ó¸é, bool °ªÀº falseÀÌ°í, iterator´Â ÀÌ¹Ì ÀÖ´Â °ªÀÌ
 µ¿ÀÏÇÑ ¿ø¼Ò¸¦ °¡¸®Å°°Ô µÉ °ÍÀÌ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
 <Emphasis remap="bf">iterator insert(iterator position, T&#38; x)</Emphasis>. 
 ÀÌ insert ÇÔ¼ö´Â ÀÎÀڷμ­ Ãß°¡ÇÏ°íÀÚ ÇÏ´Â ¿ø¼Ò ¿Ü¿¡ iterator¸¦ ¹Þ´Âµ¥, ÀÌ´Â
 Ãß°¡ÇÒ À§Ä¡¸¦ ã±â ½ÃÀÛÇÒ iteratorÀÌ´Ù. ¸®ÅϵǴ iterator´Â À§¿Í ¸¶Âù°¡Áö·Î
 »õ·Î Ãß°¡µÈ ¿ø¼Ò³ª ÀÌ¹Ì Á¸ÀçÇÏ´Â °°Àº °ªÀÇ ¿ø¼ÒÀÌ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
 <Emphasis remap="bf">int erase(T&#38; x)</Emphasis>. 
 ÀÌ eraseÇÔ¼ö´Â Áö¿ì°íÀÚ ÇÏ´Â ¿ø¼Ò¸¦ ÀÎÀÚ·Î ¹Þ¾Æ ¸¸¾à ±× ¿ø¼Ò°¡ Á¸ÀçÇϸé Áö¿ì°í¼­ 1À»
 ¸®ÅÏÇÏ°í, ¾øÀ¸¸é 0À» ¸®ÅÏÇÑ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
 <Emphasis remap="bf">void erase(iterator position)</Emphasis>. 
 ÀÌ eraseÇÔ¼ö´Â ƯÁ¤ ¿ø¼Ò¸¦ °¡¸®Å°´Â iterator¸¦ ÀÎÀÚ·Î ¹Þ¾Æ ±× ¿ø¼Ò¸¦ Áö¿î´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 <Emphasis remap="bf">void erase(iterator first, iterator last)</Emphasis>. 
 ÀÌ eraseÇÔ¼ö´Â µÎ iterator¸¦ ÀÎÀÚ·Î ¹Þ¾Æ &lsqb;first,last&rsqb; ¹üÀ§ÀÇ ¸ðµç ¿ø¼Ò¸¦ Áö¿î´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
¾Æ·¡ÀÇ ¿¹´Â À§ ÇÔ¼öµéÀÇ »ç¿ë¹ýÀ» º¸¿©ÁØ´Ù.
</Para>

<Para>

<ProgramListing>
&#60;set-add-delete.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;set&#62;
#include "printset.h"

using namespace std;

int main()
{
    set&#60;int, less&#60;int&#62; &#62; s1;

    // Ç¥ÁØÀûÀÎ ¹æ½ÄÀ¸·Î ¿ø¼Ò¸¦ Ãß°¡ÇÑ´Ù.
    s1.insert(1);
    s1.insert(2);
    s1.insert(-2);

    // ƯÁ¤À§Ä¡¿¡ ¿ø¼Ò »ðÀÔ
    s1.insert(s1.end(), 3);
    s1.insert(s1.begin(), -3);
    s1.insert((s1.begin()++)++, 0);

    cout &#60;&#60; "s1 = " &#60;&#60; s1 &#60;&#60; endl;

    // ¼º°øÀûÀ¸·Î Ãß°¡µÇ¾ú´ÂÁö üũ
    pair&#60;set&#60;int, less&#60;int&#62; &#62;::iterator,bool&#62; x = s1.insert(4);
    cout &#60;&#60; "Insertion of 4 " &#60;&#60; (x.second ? worked. : failed.) 
            &#60;&#60; endl;
    x = s1.insert(0);
    cout &#60;&#60; "Insertion of 0 " &#60;&#60; (x.second ? worked. : failed.) 
            &#60;&#60; endl;

    // insert¿¡¼­ ¸®ÅÏµÈ iterator¸¦ µÎ¹ø° ÇüÅÂÀÇ insertÀÇ ÀÎÀÚ·Î
    // »ç¿ëÇÒ ¼ö ÀÖ´Ù.
    cout &#60;&#60; "Inserting 10, 8 and 7." &#60;&#60; endl;
    s1.insert(10);
    x=s1.insert(7);
    s1.insert(x.first, 8);

    cout &#60;&#60; "s1 = " &#60;&#60; s1 &#60;&#60; endl;

    // ¸î ¿ø¼ÒµéÀ» Áö¿î´Ù.
    cout &#60;&#60; "Removal of 0 " &#60;&#60; (s1.erase(0) ? worked. : failed.)
            &#60;&#60; endl;
    cout &#60;&#60; "Removal of 5 " &#60;&#60; (s1.erase(5) ? worked. : failed.)
            &#60;&#60; endl;

    // ¿ø¼Ò¸¦ ã¾Æ¼­, Áö¿î´Ù. (find ÇÔ¼ö´Â ´ÙÀ½ ÀåÀ» ÂüÁ¶)
    cout &#60;&#60; "Searching for 7." &#60;&#60; endl;
    set&#60;int,less&#60;int&#62; &#62;::iterator e = s1.find(7);
    cout &#60;&#60; "Removing 7." &#60;&#60; endl;
    s1.erase(e);

    cout &#60;&#60; "s1 = " &#60;&#60; s1 &#60;&#60; endl;

    // ¸¶Áö¸·À¸·Î ¸ðµç ¿ø¼Ò¸¦ Áö¿î´Ù.
    cout &#60;&#60; "Removing all elements from s1." &#60;&#60; endl;
    s1.erase(s1.begin(), s1.end());
    cout &#60;&#60; "s1 = " &#60;&#60; s1 &#60;&#60; endl;
    cout &#60;&#60; "s1 is now " &#60;&#60; (s1.empty() ? empty. : non-empty.)
            &#60;&#60; endl;
}
</ProgramListing>

</Para>

</Sect3>

<Sect3>
<Title>¿ø¼Ò¸¦ ã±â</Title>

<Para>
¾î¶² ¿ø¼Ò°¡ ÁýÇÕ¿¡ ÀÖ´ÂÁö üũÇØÁÖ´Â µÎ°¡Áö ÇÔ¼ö°¡ ÀÖ´Ù.
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
 <Emphasis remap="bf">iterator find(T&#38; x)</Emphasis>. 
 ÀÌ ÇÔ¼ö´Â ÁýÇÕ¿¡ ¿ø¼Ò x°¡ Á¸ÀçÇÏ´ÂÁö ã´Â´Ù. ¸¸¾à ãÀ¸¸é 
 À̸¦ °¡¸®Å°´Â iterator¸¦ ¸®ÅÏÇÏ°í, ¾øÀ¸¸é end()¸¦ ¸®ÅÏÇÑ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
 <Emphasis remap="bf">int count(T&#38; x)</Emphasis>. 
 ÀÌÇÔ¼ö´Â Á¸ÀçÇϸé 1À», ¾øÀ¸¸é 0À» ¸®ÅÏÇÑ´Ù.
 (multiset¿¡¼­ÀÇ countÇÔ¼ö´Â °°Àº ¿ø¼Ò°¡ ¿©·¯°³ ÀÖÀ» ¼ö ÀÖÀ¸¹Ç·Î 
 ¸®ÅÏ°ªÀÌ 1º¸´Ù ´õ Ŭ ¼öµµ ÀÖ´Ù.
 count¶ó´Â ¸»ÀÇ ¶æÀ» »ý°¢Çغ¸¶ó! )
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
findÀÇ »ç¿ë¹ýÀº ÀÌ¹Ì À§¿¡ º¸ÀÎ ÀûÀÌ ÀÖ´Ù. ¿ì¸®´Â count¸¦ ÀÌ¿ëÇÏ¿© °£´ÜÇÑ template±â¹ÝÀÇ
ÁýÇÕ¿¡ ¼ÓÇÏ´ÂÁö testÇÏ´Â ÇÔ¼ö¸¦ ¸¸µé ¼ö ÀÖ´Ù.
(ÀÌ´Â ÀÎÀÚ x¿¡ ´ëÇÑ ·¹ÆÛ·±½º¸¦ Á¦°øÇÑ´Ù.)
</Para>

<Para>

<ProgramListing>
&#60;setmember.h&#62;=
#ifndef _SETMEMBER_H
#define _SETMEMBER_H
#include &#60;set&#62;

template&#60;class T, class Comp&#62;
bool member(T x, std::set&#60;T,Comp&#62;&#38; s)
{
 return (s.count(x)==1 ? true : false);
}
#endif

// ÀÌ´Â ´ÙÀ½°ú °°ÀÌ ¾²ÀÏ ¼ö ÀÖ´Ù.

&#60;set-membership.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;set&#62;
#include "printset.h"
#include "setmember.h"

using namespace std;

int main()
{
    set&#60;int, less&#60;int&#62; &#62; s;
    for (int i= 0; i&#60;10; i++) s.insert(i);
    cout &#60;&#60; "s = " &#60;&#60; s &#60;&#60; endl;
    cout &#60;&#60; "1 is " &#60;&#60; (member(1,s) ?  : not) &#60;&#60; " a member of s "
            &#60;&#60;  endl;
    cout &#60;&#60; "10 is " &#60;&#60; (member(10,s) ?  : not) &#60;&#60; " a member of s "
            &#60;&#60;  endl;
}
</ProgramListing>

</Para>

</Sect3>

<Sect3>
<Title>ÁýÇÕ ¿¬»ê</Title>

<Para>
STLÀº ºÎºÐÁýÇÕ, ÇÕÁýÇÕ, ±³ÁýÇÕ, Â÷ÁýÇÕ, ´ëĪÂ÷ÁýÇÕ(XOR) µîÀÇ 
ÁýÇÕ¿¬»êÀ» generic ¾Ë°í¸®ÁòÀ¸·Î Á¦°øÇÑ´Ù.
ÀÌ ÇÔ¼öµéÀ» ÀÌ¿ëÇϱâ À§Çؼ­´Â algo.h¸¦ include ÇؾßÇÑ´Ù.
(¾Æ·¡ÀÇ ³»¿ëÁß iter´Â ÀûÀýÇÑ iterator¸¦ ÀǹÌÇÑ´Ù).
</Para>

<Para>

<ItemizedList>
<ListItem>
<Para>
 bool includes(iter f1,iter l1,iter f2,iter l2). 
</Para>

<Para>
À§ ÇÔ¼ö´Â &lsqb;f2,l2] ¹üÀ§¿¡ ÀÖ´Â °ÍµéÀÌ &lsqb;f1,l1] ¾ÈÀÇ °ÍµéÀ» Æ÷ÇÔÇÏ´Â Áö¸¦ üũÇÑ´Ù.
¸¸¾à Æ÷ÇÔÇϸé true¸¦, ±×·¸Áö ¾ÊÀ¸¸é false¸¦ ¸®ÅÏÇÑ´Ù.
µû¶ó¼­ ÇÑ ÁýÇÕÀÌ ´Ù¸¥ ÁýÇÕÀ» Æ÷ÇÔÇÏ´Â Áö¸¦ º¸·Á¸é, ´ÙÀ½°ú °°ÀÌ ÇÏ¸é µÈ´Ù.
</Para>

<Para>
includes(s1.begin(), s1.end(), s2.begin(), s2.end())
</Para>

<Para>
The includes function checks the truth of 3&num;3 ( that is of 4&num;4).

ÀÌ ÇÔ¼ö´Â ÁýÇÕÀÌ &#60; ¿¬»êÀÚ¸¦ ÀÌ¿ëÇØ Á¤·ÄµÇ¾ú´Ù°í º»´Ù. ¸¸¾à, &#60;ÀÌ ¾Æ´Ñ ´Ù¸¥ ¿¬»êÀÚ
°¡ »ç¿ëµÇ¾ú´Ù¸é, ÀÌ(function object)¸¦ ¸¶Áö¸· ÀÎÀڷμ­ Ãß°¡·Î ³Ñ°ÜÁÖ¸é µÈ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
 iter set&lowbar;union(iter f1,iter l1,iter f2,iter l2,iter result). 
</Para>
<Para>

ÀÌ´Â &lsqb;f1,l1]°ú &lsqb;f2,l2] ¹üÀ§¿¡ ÀÖ´Â ÁýÇÕµéÀÇ ÇÕÁýÇÕÀ» ¸¸µç´Ù.
ÀÎÀÚ·Î ÁÖ´Â result °ªÀº »õ·Î¸¸µé¾îÁø ÇÕÁýÇÕÀÇ Ã¹ ÀÎÀÚ¸¦ °¡¸®Å°´Â iteratorÀÌ´Ù.
¸®ÅÏ°ªÀº »õ·Î¿î ÁýÇÕÀÇ ³¡(end)¸¦ °¡¸®Å°´Â iteratorÀÌ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
result ÀÎÀÚ°¡ iterator¶õ ¸»Àº, ´ÙÀ½°ú °°Àº ½ÄÀ¸·Î set&lowbar;unionÀ» »ç¿ëÇÏ¸é ¾ÈµÈ´Ù´Â
°ÍÀÌ´Ù.
</Para>

<Para>

<ProgramListing>
      set&#60;int, less&#60;int&#62; &#62; s1, s2, s3;
      // s1 °ú s2ÀÇ ¿ø¼Ò¸¦ °¡Áö°í ÇÕÁýÇÕÀ» ¸¸µç´Ù.
      // (±×·¯³ª ÀÌ·± ½ÄÀ¸·Î´Â µ¿ÀÛÇÏÁö ¾ÊÀ½)
      set_union(s1.begin(), s1.end(), 
                s2.begin(), s2.end(), 
                s3.begin());
</ProgramListing>

</Para>

<Para>
±× ÀÌÀ¯´Â begin()°ú end()°¡ ÁýÇÕÀ̳ª ¸Ê¿¡ »ç¿ëµÉ ¶§´Â »ó¼ö input iterator°¡ µÇ±â ¶§¹®ÀÌ´Ù.
ÀÌ·¯ÇÑ iterator´Â ÁýÇÕÀÇ ¿ø¼Ò¸¦ Àбâ À§Çؼ­´Â »ç¿ëµÉ ¼ö ÀÖÁö¸¸, °ªÀ» ¾µ ¼ö´Â ¾ø´Ù.
(¶ÇÇÑ ¸¸¾à °ªÀ» ¾µ ¼ö ÀÖ°Ô ÇÑ´Ù¸é ÁýÇÕÀÇ ¼ø¼­¸¦ ¸Á°¡¶ß¸± ¼ö ÀÖ´Â À§ÇèÀÌ ÀÖ±â
¶§¹®À̱⵵ ÇÏ´Ù)
</Para>

<Para>
ÇØ°áÃ¥Àº set_typeÀÇ insert iterator¸¦ »ç¿ëÇÏ´Â °ÍÀÌ´Ù. ÀÌ´Â
(*i)=value °°Àº ºÒ°¡´ÉÇÑ ±¸¹®À» s.insert(i,value)ÀÇ ÇüÅ·Π¾µ ¼ö ÀÖ°Ô ÇØÁØ´Ù.
(¿©±â¼­ s´Â iterator i°¡ °¡¸®Å°´Â ÁýÇÕÀÌ´Ù. ÀÌ´Â ´ÙÀ½°ú °°ÀÌ ¾²ÀδÙ.
</Para>

<Para>

<ProgramListing>
      // ÆíÀǸ¦ À§ÇØ Typedef¸¦ »ç¿ë
      typedef set&#60;int, less&#60;int&#62; &#62; intSet;  
      intSet s1, s2, s3;
      // s1°ú s2¿¡ ¸î ¿ø¼Ò¸¦ Ãß°¡.
      // ±×¸®°í ÇÕÁýÇÕÀ» ±¸ÇÑ´Ù.
      set_union(s1.begin(), s1.end(), 
                s2.begin(), s2.end(), 
                insert_iterator&#60;intSet&#62;(s3,s3.begin()) );
</ProgramListing>

</Para>

<Para>
ÀÌÁ¦ À§¿¡ ³ª¿À´Â °ÍµéÀ» Á¾ÇÕÀûÀ¸·Î »ç¿ëÇÏ´Â ¿¹Á¦¸¦ º¸ÀÚ.
</Para>

<Para>

<ProgramListing>
&#60;set-theory.cpp&#62;=
#include &#60;iostream&#62;
#include &#60;set&#62;
#include &#60;algorithm&#62;
#include &#60;iterator&#62;
#include "printset.h"

using namespace std;

int main()
{
    typedef set&#60;int, less&#60;int&#62; &#62; intSet;

    intSet s1, s2, s3, s4;

    for (int i=0; i&#60;10; i++)
    { s1.insert(i);
        s2.insert(i+4);
    }
    for (int i=0; i&#60;5; i++) s3.insert(i);

    cout &#60;&#60; "s1 = " &#60;&#60; s1 &#60;&#60; endl;
    cout &#60;&#60; "s2 = " &#60;&#60; s2 &#60;&#60; endl;
    cout &#60;&#60; "s3 = " &#60;&#60; s3 &#60;&#60; endl;

    // s1ÀÌ s2ÀÇ ºÎºÐÁýÇÕÀΰ¡?
    bool test = includes(s2.begin(),s2.end(),s1.begin(),s1.end());
    cout &#60;&#60; "s1 subset of s2 is " &#60;&#60; (test ? true. : false.) &#60;&#60; endl;

    // s3°¡ s1ÀÇ ºÎºÐÁýÇÕÀΰ¡?
    test = includes(s1.begin(),s1.end(),s3.begin(),s3.end());
    cout &#60;&#60; "s3 subset of s1 is " &#60;&#60; (test ? true. : false.) &#60;&#60; endl;

    // s1°ú s2ÀÇ ÇÕÁýÇÕ.
    set_union(s1.begin(), s1.end(), s2.begin(), s2.end(),
            insert_iterator&#60;intSet&#62;(s4,s4.begin()) );
    cout &#60;&#60; "s1 union s2 = " &#60;&#60; s4 &#60;&#60; endl;

    // s4¸¦ Áö¿ì°í, s1°ú s2ÀÇ ±³ÁýÇÕÀ» ±¸ÇÑ´Ù.
    // ( ¸¸¾à s4¸¦ Áö¿ìÁö ¾ÊÀ¸¸é ¿ø·¡ s4¿¡ µé¾îÀÖ´Â °Íµéµµ
    // °°ÀÌ µé¾î°¡°Ô µÉ °ÍÀÌ´Ù. )
    s4.erase(s4.begin(),s4.end());
    set_intersection(s1.begin(), s1.end(), s2.begin(), s2.end(),
            insert_iterator&#60;intSet&#62;(s4,s4.begin()) );
    cout &#60;&#60; "s1 intersection s2 = " &#60;&#60; s4 &#60;&#60; endl;

    // Â÷ÁýÇÕ
    s4.erase(s4.begin(),s4.end());
    set_difference(s1.begin(), s1.end(), s2.begin(), s2.end(),
            insert_iterator&#60;intSet&#62;(s4,s4.begin()) );
    cout &#60;&#60; "s1 minus s2 = " &#60;&#60; s4 &#60;&#60; endl;

    // Â÷ÁýÇÕÀº ´ëĪÀûÀÌÁö ¾Ê´Ù. (Áï, A-B != B-A)
    s4.erase(s4.begin(),s4.end());
    set_difference(s2.begin(), s2.end(), s1.begin(), s1.end(),
            insert_iterator&#60;intSet&#62;(s4,s4.begin()) );
    cout &#60;&#60; "s2 minus s1 = " &#60;&#60; s4 &#60;&#60; endl;

    // ´ëĪÂ÷ÁýÇÕ
    s4.erase(s4.begin(),s4.end());
    set_symmetric_difference(s1.begin(), s1.end(), s2.begin(), s2.end(),
            insert_iterator&#60;intSet&#62;(s4,s4.begin()) );
    cout &#60;&#60; "s1 symmetric_difference  s2 = " &#60;&#60; s4 &#60;&#60; endl;

    // ´ëĪÂ÷ÁýÇÕÀº ´ëĪÀûÀÌ´Ù. (Áï, commutative)
    s4.erase(s4.begin(),s4.end());
    set_symmetric_difference(s2.begin(), s2.end(), s1.begin(), s1.end(),
            insert_iterator&#60;intSet&#62;(s4,s4.begin()) );
    cout &#60;&#60; "s2 symmetric_difference  s1 = " &#60;&#60; s4 &#60;&#60; endl;
}
</ProgramListing>

</Para>

</Sect3>

</Sect2>

<Sect2>
<Title>¸Ê</Title>

<Para>
<XRef LinkEnd="stlref">ÀåÀ» º¸¾Æ¶ó.
</Para>

</Sect2>

<Sect2>
<Title>STL ¾Ë°í¸®Áò</Title>

<Para>
<XRef LinkEnd="stlref">ÀåÀ» º¸¾Æ¶ó.
</Para>

</Sect2>

</Sect1>

<Sect1>
<Title>C++¿¡¼­ÀÇ ¾²·¹µå</Title>

<Para>

<ItemizedList>
<ListItem>
<Para>
 IBM pthread °¡À̵å, °³³ä, API ·¹ÆÛ·±½º
<ULink
URL="http://www.as400.ibm.com/developer/threads/uguide/document.htm"
>http://www.as400.ibm.com/developer/threads/uguide/document.htm</ULink
>
¹Ì·¯»çÀÌÆ® : 
<ULink
URL="http://java.icmc.sc.usp.br/library/books/ibm_pthreads/document.htm"
>IBM main site</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 C++ÀÇ QpThread ¶óÀ̺귯¸®´Â system level ¾²·¹µå(POSIX thread)  À§¿¡¼­ ¾²·¹µå¿Í 
 Unix signalÀ» À§ÇÑ C++ °´Ã¼ÁöÇⱸÁ¶¸¦ Á¦°øÇÑ´Ù.
<ULink
URL="http://lin.fsid.cvut.cz/~kra/index.html"
>http://lin.fsid.cvut.cz/~kra/index.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 ThreadJack Àº Ç÷§Æû¿¡ »ó°ü¾ø´Â C++ class library·Î¼­, 
 Java¿Í À¯»çÇÑ ¸ÖƼ¾²·¹µå ÇÁ·Î±×·¡¹Ö ¸ðµ¨À» Á¦°øÇÑ´Ù.
<ULink
URL="http://www.esm.co.jp/divisions/open-sys/ThreadJack/index-e.html"
>http://www.esm.co.jp/divisions/open-sys/ThreadJack/index-e.html</ULink
>
±×¸®°í ´ÙÀ½ÀÇ ÁÖ¼Ò¿¡¼­ ¹ÞÀ» ¼ö ÀÖ´Ù.
<ULink
URL="http://www.esm.co.jp/divisions/open-sys/ThreadJack/source-dl-e.html"
>http://www.esm.co.jp/divisions/open-sys/ThreadJack/source-dl-e.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 APE´Â "APE Portable Environment"ÀÇ ¾àÀÚ·Î, UNIX (pthread)¿Í Win32 API¸¦ ±â¹ÝÀ¸·Î
 ¾îµð¼­³ª ¾µ ¼ö ÀÖ´Â ¾²·¹µå ±â¹Ý ¼­¹ö¸¦ Á¦°øÇÏ´Â C++ class ¶óÀ̺귯¸®ÀÌ´Ù.
 APE´Â ¾²·¹µå, ¼ÒÄÏ, ÆÄÀÏÁ¦¾î, µ¿±âÈ­ µµ±¸ µîÀÇ Ãß»ó class ¸¦ Á¦°øÇÑ´Ù.
 APEÀÇ ¸ñÀûÀº C++À» ÀÌ¿ëÇÏ¿© ÀÛ°í °£´ÜÇÑ ÇÁ·ÎÁ§Æ®¿¡¼­µµ ½ÇÁ¦ÀûÀ̸鼭µµ 
 Æí¸®ÇÑ ¾²·¹µå±â¹Ý ¼­¹ö¸¦ ¸¸µå´Â °ÍÀÌ´Ù.
 µû¶ó¼­ ´Ü¼øÇÔ°ú ³·Àº ¿À¹öÇìµå°¡ Áß¿äÇÏ´Ù.
<ULink
URL="http://www.voxilla.org/projects/projape.html"
>http://www.voxilla.org/projects/projape.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 Portabale Thread Lib <ULink
URL="http://www.media.osaka-cu.ac.jp/~k-abe/PTL"
>http://www.media.osaka-cu.ac.jp/~k-abe/PTL</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 Thread-Recyling in C++ <ULink
URL="http://www.sigs.de/html/kuhlmann.html"
>http://www.sigs.de/html/kuhlmann.html</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Sect2>
<Title>¾²·¹µå Æ©Å丮¾ó</Title>

<Para>

<ItemizedList>
<ListItem>
<Para>
Æ©Å丮¾ó Àüü¸¦ ÇϳªÀÇ ÆÄÀÏ·Î ¾Æ·¡¿¡¼­ ¹ÞÀ» ¼ö ÀÖ´Ù.
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>http://www.milkywaygalaxy.freeservers.com</ULink
>
"Source code c++ Programming howto"¸¦ Ŭ¸¯Ç϶ó.
</Para>
</ListItem>
<ListItem>
<Para>
¾²·¹µå Æ©Å丮¾óÀº 
<ULink
URL="http://www.math.arizona.edu/swig/pthreads/threads.html"
>http://www.math.arizona.edu/swig/pthreads/threads.html</ULink
>¿¡ ÀÖ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
HERT Æ©Å丮¾óÀº <ULink
URL="http://www.hert.org/docs/tutorials"
>http://www.hert.org/docs/tutorials</ULink
>¿¡ ÀÖ°í, 
¾²·¹µå¿¡ ´ëÇØ Ã£¾Æº¸·Á¸é ¿©±â·Î °¡¶ó.
</Para>
</ListItem>
<ListItem>
<Para>
<ULink
URL="http://www2.linuxjournal.com/lj-issues/issue61/3138.html"
>linuxjournal</ULink
>ÀÇ ¾²·¹µå ¼Ò°³±Û.
</Para>
</ListItem>
<ListItem>
<Para>
North Arizona Univ <ULink
URL="http://www.cse.nau.edu/~mc8/Thread/Contents.html"
>NAU</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
POSIX threads <ULink
URL="http://users.actcom.co.il/~choo/lupg/tutorials/multi-thread/multi-thread.html"
>Acctcom multi-thread</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

<Sect2>
<Title>C++¿¡¼­ ¾²·¹µå class µðÀÚÀÎÇϱâ</Title>

<Para>
ÀÌ ÀåÀº 
<ULink
URL="mailto:ryte@geocities.com"
>Ryan Teixeira</ULink
>
¿¡ ÀÇÇØ ¾²¿©Á³°í, ±× ¹®¼­´Â
<ULink
URL="http://www.geocities.com/SiliconValley/Heights/6038/dthreads.html"
>¿©±â</ULink
>¿¡ ÀÖ´Ù.
.
</Para>

<Sect3>
<Title>¼Ò°³</Title>

<Para>
¸ÖƼ ¾²·¹µå ÇÁ·Î±×·¡¹ÖÀº Á¡Á¡ Àα⸦ ¾ò°íÀÖ´Ù.
ÀÌ ÀåÀº ¾²·¹µå¸¦ Áö¿øÇÏ´Â C++ classÀÇ µðÀÚÀÎÀ» º¸¿©ÁÙ °ÍÀÌ´Ù.
mutex³ª ¼¼¸¶Æ÷¾î°°Àº ¾²·¹µå ÇÁ·Î±×·¡¹ÖÀÇ ¸î¸î Ãø¸éÀº ¿©±â¼­ ³íÀǵÇÁö ¾Ê´Â´Ù.
¶ÇÇÑ ¾²·¹µåÀÇ °ü¸®¸¦ À§ÇÑ ½Ã½ºÅÛ ÄݵéÀº ÀϹÝÀûÀÎ ÇüÅ·Π³ªÅ¸³»¾ú´Ù.
</Para>

</Sect3>

<Sect3>
<Title>¾²·¹µå¿¡ ´ëÇÑ °£´ÜÇÑ ¼Ò°³</Title>

<Para>
¾²·¹µå¸¦ ÀÌÇØÇϱâ À§Çؼ­´Â, ÇѲ¨¹ø¿¡ µ¹¾Æ°¡´Â ¿©·¯ ÇÁ·Î±×·¥À» »ý°¢ÇؾßÇÑ´Ù.
¶ÇÇÑ, ÀÌ ÇÁ·Î±×·¥µéÀÌ ¶È°°Àº Àü¿ªº¯¼ö¿Í ÇÔ¼öµé¿¡ Á¢±ÙÇÑ´Ù°í »ý°¢Çغ¸¾Æ¶ó.
ÀÌ ÇÁ·Î±×·¥µéÀº ½Ç¿¡ ºñÀ¯µÉ ¼ö ÀÖ°í, ±×·¡¼­ ¾²·¹µå¶ó°í ºÒ¸°´Ù.
Áß¿äÇÑ Â÷ÀÌÁ¡ÀÌ ÀÖ´Ù¸é, °¢°¢ÀÇ ¾²·¹µå´Â ´Ù¸¥ ¾²·¹µå°¡ ÁøÇàÇÏ´Â °ÍÀ»
±â´Ù¸± ÇÊ¿ä°¡ ¾ø´Ù´Â °ÍÀÌ´Ù. ¸ðµç ¾²·¹µå°¡ µ¿½Ã¿¡ ÁøÇàµÈ´Ù.
ºñÀ¯¸¦ ÇÏÀÚ¸é, À̵éÀº À°»ó¼±¼ö¿Í °°ÀÌ ¾Æ¹«µµ ´Ù¸¥ ¼±¼ö¸¦ ±â´Ù¸®Áö
¾Ê´Â´Ù. °¢ÀÚ ÀÚ½ÅÀÇ ¼Óµµ·Î ÁøÇàµÇ´Â °ÍÀÌ´Ù.
</Para>

<Para>
¿Ö ¾²·¹µå¸¦ »ç¿ëÇÏ³Ä°í ¹°¾îº»´Ù¸é, ¾²·¹µå´Â Á¾Á¾ ¾îÇø®ÄÉÀ̼ÇÀÇ ¼º´ÉÀ»
Çâ»ó½Ãų ¼ö ÀÖ°í, ±¸ÇöÇÏ´Â°Ô ±î´Ù·ÓÁö ¾Ê´Ù.
Áï, Á¶±×¸¸ ÅõÀÚ·Î Å« È¿°ú¸¦ º¼ ¼ö ÀÖ´Â °ÍÀÌ´Ù. À̹ÌÁö¸¦ ¼­ºñ½ºÇÏ´Â
À̹ÌÁö ¼­¹ö ÇÁ·Î±×·¥À» »ý°¢Çغ¸¾Æ¶ó.
ÀÌ ÇÁ·Î±×·¥Àº ´Ù¸¥ ÇÁ·Î±×·¥À¸·ÎºÎÅÍ À̹ÌÁö¿¡ ´ëÇÑ ¿äûÀ» ¹Þ´Â´Ù.
±×·¯¸é ÀÌ À̹ÌÁö¸¦ µ¥ÀÌÅͺ£À̽º¿¡¼­ ã¾Æ ¿äûÀ» º¸³½ ÇÁ·Î±×·¥¿¡°Ô
´Ù½Ã º¸³»ÁØ´Ù. ¸¸¾à ¼­¹ö°¡ ÇϳªÀÇ ¾²·¹µå·Î ¸¸µé¾îÁ³´Ù¸é, Çѹø¿¡
ÇϳªÀÇ ÇÁ·Î±×·¥¸¸ ¿äûÀ» º¸³¾ ¼ö ÀÖÀ» °ÍÀÌ´Ù. ¸¸¾à ÇÁ·Î±×·¥ÀÌ
À̹ÌÁö¸¦ ã°Å³ª º¸³»ÁÖ´Â ÁßÀ̶ó¸é ´Ù¸¥ ¿äûÀ» ó¸®ÇÒ ¼ö ¾øÀ» °ÍÀÌ´Ù.
¹°·Ð ÀÌ·¯ÇÑ ½Ã½ºÅÛÀ» ¾²·¹µå¸¦ ÀÌ¿ëÇÏÁö ¾Ê°íµµ ¸¸µé ¼ö ÀÖÁö¸¸,
¾²·¹µå¸¦ ¾²¸é, ¿©·¯°³ÀÇ ¿äûÀ» ¾ÆÁÖ ÀÚ¿¬½º·´°Ô ó¸®ÇÒ ¼ö ÀÖ°Ô µÈ´Ù.
°£´ÜÇÑ Á¢±Ù ¹æ¹ýÀº ÇϳªÀÇ ¿äû´ç ÇϳªÀÇ ¾²·¹µå¸¦ ¸¸µå´Â °ÍÀÌ´Ù.
¸ÞÀÎ ¾²·¹µå´Â ¿äû¿¡ µû¶ó ¾²·¹µå¸¦ ¸¸µé¾îÁֱ⸸ ÇÏ¸é µÈ´Ù.
±×·¯¸é »õ·Î ¸¸µé¾îÁø ¾²·¹µå°¡ ¿äûÇÏ´Â ÇÁ·Î±×·¥°ú ´ëÈ­Çϸ鼭
¼­ºñ½º¸¦ ÇØÁÖ¸é µÈ´Ù. À̹ÌÁö¸¦ ã¾Æ¼­ º¸³½ ÈÄ¿¡´Â ¾²·¹µå°¡
½º½º·Î Á¾·áÇÏ¸é µÈ´Ù. ÀÌ·¸°Ô Çϸé ÇϳªÀÇ ¿äûÀ» ¼­ºñ½º ÇÏ´Â µµÁß¿¡µµ
´Ù¸¥ ¿äûÀ» ¹ÞÀ» ¼ö ÀÖ´Â À¯¿¬ÇÑ ½Ã½ºÅÛÀÌ µÉ °ÍÀÌ´Ù.
</Para>

</Sect3>

<Sect3>
<Title>±âº»ÀûÀÎ Á¢±Ù¹æ¹ý</Title>

<Para>
¾²·¹µå¸¦ ¸¸µé±â À§Çؼ­´Â, ¾²·¹µåÀÇ ½ÃÀÛÁ¡ÀÌ µÉ ÇÔ¼ö¸¦ ¸í½ÃÇØ¾ß ÇÑ´Ù.
¿î¿µÃ¼Á¦ ·¹º§¿¡¼­´Â, ÀÌ°ÍÀÌ ÀϹÝÀûÀÎ ÇÔ¼öÀÌ´Ù.
±×·±µ¥ C++ÀÇ class ¸â¹öÇÔ¼ö´Â ½ÃÀÛÇÔ¼ö°¡ µÉ ¼ö ¾ø±â ¶§¹®¿¡ ¾à°£ÀÇ Æ®¸¯À»
½á¾ßÇÑ´Ù.
ÇÏÁö¸¸, Ŭ·¡½ºÀÇ static ¸â¹öÇÔ¼ö´Â °¡´ÉÇÏ´Ù. ÀÌ°ÍÀÌ ¿ì¸®°¡ ½ÃÀÛÇÔ¼ö·Î
ÀÌ¿ëÇÒ °ÍÀÌ´Ù.
static ¸â¹öÇÔ¼ö´Â C++ °´Ã¼ÀÇ this Æ÷ÀÎÅ͸¦ »ç¿ëÇÒ ¼ö ¾ø´Ù.
À̵éÀº ¿ÀÁ÷ static µ¥ÀÌÅ͸¸ Á¢±ÙÇÒ ¼ö ÀÖ´Ù. ´ÙÇàÈ÷µµ ¹æ¹ýÀÌ ÀÖ´Ù.
¾²·¹µåÀÇ ½ÃÀÛÁ¡ ÇÔ¼ö´Â ÀÎÀÚ·Î void *¸¦ °®°Ô µÇ´Âµ¥, À̸¦ ¾²·¹µå ¾È¿¡¼­
¾î¶² ŸÀÔÀ¸·Î³ª casting Çؼ­ ¾µ ¼ö ÀÖ´Ù.
¿ì¸®´Â À̸¦ static ÇÔ¼ö¿¡ this ¸¦ ³Ñ°ÜÁÖ±â À§ÇØ ¾µ °ÍÀÌ´Ù.
µû¶ó¼­ static ÇÔ¼ö´Â À̸¦ casting ÇÏ¿© staticÀÌ ¾Æ´Ñ ÇÔ¼ö¸¦ ºÎ¸£±â À§ÇØ ¾µ ¼ö ÀÖ´Ù.
</Para>

</Sect3>

<Sect3>
<Title>±¸Çö</Title>

<Para>
¿ì¸®´Â ¾à°£ Á¦ÇÑµÈ ±â´ÉÀ» °®´Â ¾²·¹µå class¸¦ ¸¸µé °ÍÀÌ´Ù.
½ÇÁ¦ ¾²·¹µå´Â ÀÌ class°¡ ÇÏ´Â °Íº¸´Ù ÈξÀ ¸¹Àº ÀϵéÀ» ÇÒ ¼ö ÀÖ´Ù.
</Para>

<Para>

<ProgramListing>
class Thread
{
   public:
      Thread();
      int Start(void * arg);
   protected:
      int Run(void * arg);
      static void * EntryPoint(void*);
      virtual void Setup();
      virtual void Execute(void*);
      void * Arg() const {return Arg_;}
      void Arg(void* a){Arg_ = a;}
   private:
      THREADID ThreadId_;
      void * Arg_;

};

Thread::Thread() {}

int Thread::Start(void * arg)
{
   Arg(arg); // user µ¥ÀÌÅ͸¦ ÀúÀåÇÔ.
   int code = thread_create(Thread::EntryPoint, this, &#38; ThreadId_);
   return code;
}

int Thread::Run(void * arg)
{
   Setup();
   Execute( arg );
}

/*static */
void * Thread::EntryPoint(void * pthis)
{
   Thread * pt = (Thread*)pthis;
   pthis-&#62;Run( Arg() );
}

virtual void Thread::Setup()
{
        // Setup¿¡ ÇØ´çÇÏ´Â Àϵé
}

virtual void Thread::Execute(void* arg)
{
        // ½ÇÇàÇÒ ³»¿ë
}
</ProgramListing>

</Para>

<Para>
¿ì¸®°¡ ¾²·¹µå¸¦ C++ °´Ã¼·Î »ç¿ëÇÏ°íÀÚ ÇÑ´Ù´Â °ÍÀ» ÀÌÇØÇÏ´Â °ÍÀÌ Áß¿äÇÏ´Ù.
°¢°¢ÀÇ °´Ã¼´Â ÇϳªÀÇ ¾²·¹µå¿¡ ´ëÇÑ ÀÎÅÍÆäÀ̽º¸¦ Á¦°øÇÑ´Ù. ¾²·¹µå¿Í °´Ã¼´Â ´Ù¸£´Ù.
°´Ã¼´Â ¾²·¹µå ¾øÀÌ Á¸ÀçÇÒ ¼ö ÀÖ´Ù. ÀÌ ±¸Çö¿¡¼­, ¾²·¹µå ÀÚü´Â Start ÇÔ¼ö°¡
ºÒ¸± ¶§±îÁö Á¸ÀçÇÏÁö ¾Ê´Â´Ù.
</Para>

<Para>
¿©±â¼­ userÀÇ ÀÎÀÚ¸¦ class¿¡ ÀúÀåÇѴٴµ¥ ÁÖÀÇÇضó.
ÀÌ´Â ¾²·¹µå°¡ ½ÃÀÛµÉ ¶§±îÁö Àӽ÷ΠÀ̸¦ ÀúÀåÇÒ °ø°£ÀÌ ÇÊ¿äÇϱ⠶§¹®ÀÌ´Ù.
¿î¿µÃ¼Á¦ ¾²·¹µå´Â ÀÎÀÚ¸¦ Çϳª ³Ñ±æ ¼ö ÀÖ°Ô ÇØÁÖÁö¸¸, ¿ì¸®´Â this ¶§¹®¿¡ À̸¦ Á÷Á¢
³Ñ°ÜÁÙ ¼ö ¾ø´Ù. ±×·¡¼­ ¿ì¸®´Â ÀÎÀÚ¸¦ Àá½Ã class¿¡ ÀúÀåÇß´Ù°¡ ÇÔ¼ö°¡ ½ÃÀÛµÉ ¶§
´Ù½Ã ²¨³»¼­ ³Ñ°ÜÁÖ°Ô µÈ´Ù.
</Para>

<Para>
<Emphasis remap="bf">Thread(); </Emphasis>
»ý¼ºÀÚÀÌ´Ù.
</Para>

<Para>
<Emphasis remap="bf">int Start(void * arg); </Emphasis>
ÀÌ ÇÔ¼ö´Â ¾²·¹µå¸¦ ¸¸µé°í, À̸¦ ½ÃÀÛÇÏ°Ô ÇØÁØ´Ù.
ÀÌ ÀÎÀÚ´Â ¾²·¹µå¿¡ µ¥ÀÌÅ͸¦ ³Ñ°ÜÁÖ±â À§ÇØ »ç¿ëµÇ°í,
Start()´Â ¿î¿µÃ¼Á¦ÀÇ ¾²·¹µå »ý¼º ÇÔ¼ö¸¦ ºÎ¸§À¸·Î½á ¾²·¹µå¸¦ ¸¸µç´Ù.
</Para>

<Para>
<Emphasis remap="bf">int Run(void * arg); </Emphasis>
ÀÌ ÇÔ¼ö´Â °Çµå¸®¸é ¾ÈµÇ´Â ÇÔ¼öÀÌ´Ù.
</Para>

<Para>
<Emphasis remap="bf">static void * EntryPoint(void * pthis); </Emphasis>
ÀÌ ÇÔ¼ö´Â ¾²·¹µåÀÇ ½ÃÀÛ Á¡ ¿ªÇÒÀ» ÇÑ´Ù.
ÀÌ ÇÔ¼ö´Â ´Ü¼øÈ÷ pthis¸¦ Thread *·Î castingÇؼ­ Run ÇÔ¼ö¸¦ ºÒ·¯ÁØ´Ù.
</Para>

<Para>
<Emphasis remap="bf">virtual void Setup(); </Emphasis>
ÀÌ ÇÔ¼ö´Â ¾²·¹µå°¡ ¸¸µé¾îÁø ÈÄ, ½ÇÇàÀÌ ½ÃÀ۵DZâ Àü¿¡ ºÒ·ÁÁø´Ù.
ÀÌ ÇÔ¼ö¸¦ override ÇÒ ¶§´Â, ºÎ¸ð classÀÇ Setup()¸¦ ºÎ¸£´Â °ÍÀ» ±â¾ïÇ϶ó.
</Para>

<Para>
<Emphasis remap="bf">virtual void Execute(void *); </Emphasis>
ÇÏ°íÀÚ ÇÏ´Â ÀÏÀ» À§ÇØ ÀÌ ÇÔ¼ö¸¦ overrideÇضó.
</Para>

</Sect3>

<Sect3>
<Title>Thread Class »ç¿ëÇϱâ</Title>

<Para>
thread class¸¦ »ç¿ëÇϱâ À§Çؼ­´Â, »õ·Î¿î class¸¦ ¸¸µé¾î¾ß ÇÑ´Ù.
±×¸®°í ¸¸µé°íÀÚ ÇÏ´Â ±â´ÉÀ» À§ÇØ Execute()¸¦ overrideÇÏ¸é µÈ´Ù.
¶ÇÇÑ, Execute°¡ ºÒ¸®±â ÀüÀÇ ÃʱâÈ­¸¦ À§ÇØ Setup()À» overrideÇÒ ¼öµµ ÀÖ´Ù.
¸¸¾à, Setup()À» overrideÇÑ´Ù¸é, ºÎ¸ð classÀÇ Setup()À» ºÎ¸£´Â °ÍÀ» ±â¾ïÇ϶ó.
</Para>

</Sect3>

<Sect3>
<Title>°á·Ð</Title>

<Para>
ÀÌ ÀåÀº C++·Î ¾²·¹µå classÀÇ ±¸ÇöÀ» »ìÆ캸¾Ò´Ù.
¹°·Ð ÀÌ°ÍÀº ´Ü¼øÇÑ Á¢±Ù¹æ¹ýÀÌ°í, ´õ ÁÁÀº µðÀÚÀÎÀ» À§ÇÑ ±âÃÊ·Î ¾²ÀÏ ¼ö
ÀÖÀ» °ÍÀÌ´Ù.
</Para>

<Para>
¸¸¾à ÄÚ¸àÆ®³ª Á¦¾ÈÇÏ°í ½ÍÀº °ÍÀÌ ÀÖÀ¸¸é, ¸ÞÀÏÀ» ½áÁֱ⠹ٶõ´Ù.
<ULink
URL="mailto:ryte@geocities.com"
>Ryan Teixeira</ULink
>
</Para>

</Sect3>

</Sect2>

</Sect1>

<Sect1>
<Title>C++ À¯Æ¿¸®Æ¼µé</Title>

<Para>
C++ À¯Æ¿¸®Æ¼¸¦ À§ÇÑ ´ÙÀ½ »çÀÌÆ®¸¦ ¹æ¹®Çغ¸¶ó.

<ItemizedList>
<ListItem>
<Para>
 Portable C++ utilities  from <ULink
URL="http://www.boost.org"
>http://www.boost.org</ULink
>.
Boost À¥»çÀÌÆ®´Â ÀÌ½Ä °¡´ÉÇÑ C++ ¼Ò½º ¶óÀ̺귯¸®¸¦ Á¦°øÇÑ´Ù.
Áß¿äÇÑ Á¡Àº ÀÌ ¶óÀ̺귯¸®°¡ C++ Ç¥ÁØ ¶óÀ̺귯¸®¿Í ÇÔ²² Àß µ¿ÀÛÇÑ´Ù´Â °ÍÀÌ´Ù.
ÀÌ ¸ñÀûÀº "¾²ÀÏ ¼ö ÀÖ´Â ½ÇÁ¦ÀûÀÎ °Í"À» ¸¸µéÀÚ´Â °ÍÀ¸·Î,
½ÇÁ¦ ±¸Çö¿¡ Âü°í»çÇ×ÀÌµÉ ¼ö ÀÖ´Ù. µû¶ó¼­ Boost ¶óÀ̺귯¸®´Â
ÃÖÁ¾ Ç¥ÁØÈ­¿¡ ÀûÀýÇÒ °ÍÀÌ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
 The smart pointer library ( <ULink
URL="http://www.boost.org/libs/smart_ptr/index.htm"
>http://www.boost.org/libs/smart_ptr/index.htm</ULink
> )
´Â ´Ù¼¸°¡Áö smart pointer class template¸¦ Á¦°øÇÑ´Ù.
smart pointer´Â C++ÀÇ new Ç¥ÇöÀ¸·Î ÇÒ´çµÇ´Â µ¿Àû ¸Þ¸ð¸®ÀÇ °ü¸®¸¦
½±°Ô ÇØÁØ´Ù.
Ãß°¡·Î scoped&lowbar;ptr´Â ´Ù¸¥ ¹æ¹ýµé·Î ÇÒ´çµÇ´Â µ¿Àû ¸Þ¸ð¸® °ü¸®¸¦
½±°Ô ÇØÁØ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
 C++ Binary File I/O 
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/cpp_BinaryFileIO.html"
>http://www.angelfire.com/country/aldev0/cpphowto/cpp_BinaryFileIO.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 Portability Guide 
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/cpp_PortabilityGuide.html"
>http://www.angelfire.com/country/aldev0/cpphowto/cpp_PortabilityGuide.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 Snippets collections of C++ routines
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/cpp_Snippets.html"
>http://www.angelfire.com/country/aldev0/cpphowto/cpp_Snippets.html</ULink
>
¿Í <ULink
URL="http://www.strangecreations.com/library/snippets"
>snippets site</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 escape ISB for C++ -
 ÇÁ·Î±×·¥À» ¾î¶»°Ô °³¹ßÇÏ°í, ºÐ»êó¸®, °´Ã¼±â¹Ý ¾îÇø®ÄÉÀ̼ÇÀ»
 Netscape Internet Service Broker¸¦ »ç¿ëÇÏ´Â À©µµ¿ì¿Í À¯´Ð½º¿¡¼­
 ¾î¶»°Ô °³¹ßÇÏ´ÂÁö¿¡ ´ëÇÑ Á¤º¸¸¦ Á¦°øÇÑ´Ù.
<ULink
URL="http://docs.iplanet.com/docs/manuals/enterprise/cpluspg/contents.htm"
>http://docs.iplanet.com/docs/manuals/enterprise/cpluspg/contents.htm</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 Common C++ <ULink
URL="http://www.voxilla.org/projects/projape.html"
>http://www.voxilla.org/projects/projape.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 Large List of free C++ libs
<ULink
URL="http://www.thefreecountry.com/developercity/freelib.html"
>http://www.thefreecountry.com/developercity/freelib.html</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 C++ Tools <ULink
URL="http://development.freeservers.com"
>http://development.freeservers.com</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 C++ Tools CUJ <ULink
URL="http://www.cuj.com/code"
>http://www.cuj.com/code</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 C++libs Univ of vaasa <ULink
URL="http://garbo.uwasa.fi/pc/c-lang.html"
>http://garbo.uwasa.fi/pc/c-lang.html</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Sect2>
<Title>¸Þ¸ð¸® Åø</Title>

<Para>
¾Æ·¡ÀÇ ¸Þ¸ð¸® µð¹ö±ë ÅøµéÀ» »ç¿ëÇ϶ó.

<ItemizedList>
<ListItem>
<Para>
 <Emphasis remap="bf">"MPatrol"</Emphasis> Àº °­·ÂÇÑ ¸Þ¸ð¸® µð¹ö±ë ÅøÀÌ´Ù.
À¥»çÀÌÆ® : <ULink
URL="http://www.cbmamiga.demon.co.uk/mpatrol"
>http://www.cbmamiga.demon.co.uk/mpatrol</ULink
>
, ±×¸®°í <ULink
URL="http://www.rpmfind.net"
>http://www.rpmfind.net</ULink
> ¿¡ °¡¼­ 'mpatrol'·Î ã¾Æº¸¾Æ¶ó.
¸¸¾à, ¸®´ª½º¸¦ »ç¿ëÇÏ°í ÀÖ´Ù¸é, mpatrol*.src.rpm ÆÄÀÏÀ» rpmfind.net¿¡¼­ ´Ù¿î·Îµå ¹Þ¾Æ¶ó.
mpatrol*.src.rpmÀ» ÃֽŹöÀüÀ¸·Î ¾÷µ¥ÀÌÆ® Çϱâ À§Çؼ­´Â, ¿¾³¯ mpatrol.spec ÆÄÀÏÀ»
»ç¿ëÇÏ¿© ÃÖ½ÅÀÇ mpatrol*.tar.gzÀ» »õ·Î¿î ¼Ò½ºÆÐÅ°Áö(SRPM)À¸·Î ¸¸µé ¼ö ÀÖ´Ù.
</Para>
</ListItem>
<ListItem>
<Para>
 ¸®´ª½º ¹èÆ÷ÆÇ ¾¾µð·Ò¿¡¼­ mem&lowbar;test*.rpm ÆÐÅ°Áö¸¦ º¸¾Æ¶ó.
±×¸®°í <ULink
URL="http://www.rpmfind.net"
>http://www.rpmfind.net</ULink
> À¸·Î °¡¼­ mem&lowbar;test ·Î ã¾Æº¸¾Æ¶ó.
</Para>
</ListItem>
<ListItem>
<Para>
 ¸®´ª½º ¹èÆ÷ÆÇ ¾¾µð·Ò¿¡¼­ ElectricFence*.rpm ÆÐÅ°Áö¸¦ º¸¾Æ¶ó.
±×¸®°í <ULink
URL="http://www.rpmfind.net"
>http://www.rpmfind.net</ULink
> À¸·Î °¡¼­ electricfence·Î ã¾Æº¸¾Æ¶ó.
</Para>
</ListItem>
<ListItem>
<Para>
 Purify Tool from Rational Software Corp <ULink
URL="http://www.rational.com"
>http://www.rational.com</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 Insure++ Tool from Parasoft Corp <ULink
URL="http://www.parasoft.com"
>http://www.parasoft.com</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
 Linux Tools : <ULink
URL="http://www.xnet.com/~blatura/linapp6.html#tools"
>http://www.xnet.com/~blatura/linapp6.html#tools</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
Google, Yahoo, Lycos, Excite, Mamma.com °°Àº ¼­Ä¡¿£ÁøÀ¸·Î °¡¼­
"Linux memory debugging tools"¶ó´Â Å°¿öµå·Î ã¾Æº¸¾Æ¶ó.
</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect2>

</Sect1>

<Sect1>
<Title>ÀÌ ¹®¼­ÀÇ ´Ù¸¥ Æ÷¸Ë</Title>

<Para>
ÀÌ ¹®¼­´Â 14°¡Áö Æ÷¸ËÀ¸·Î ¹èÆ÷µÈ´Ù. - DVI, Postscript, Latex, Adobe Acrobat PDF,
LyX, GNU-info, HTML, RTF(Rich Text Format), Plain-text, Unix man pages, ÇϳªÀÇ
HTMLÆÄÀÏ, SGML (linuxdoc format), SGML (Docbook format), MS WinHelp Æ÷¸Ë.
</Para>

<Para>
ÀÌ howto ¹®¼­´Â 

<ItemizedList>
<ListItem>

<Para>
 <ULink
URL="http://www.linuxdoc.org"
>http://www.linuxdoc.org</ULink
>
¿¡¼­ HOWTOs¸¦ ´©¸£°í, À¥ºê¶ó¿ìÀú¿¡¼­ CTRL+f ³ª ALT+f¸¦ ÀÌ¿ëÇØ howto À̸§À» ³Ö¾î¼­
ãÀ» ¼ö ÀÖ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
¶ÇÇÑ, ´ÙÀ½ ¹Ì·¯»çÀÌÆ®¿¡¼­µµ ãÀ» ¼ö ÀÖ´Ù -
<ItemizedList>
<ListItem>

<Para>
 <ULink
URL="http://www.caldera.com/LDP/HOWTO"
>http://www.caldera.com/LDP/HOWTO</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 <ULink
URL="http://www.linux.ucla.edu/LDP"
>http://www.linux.ucla.edu/LDP</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 <ULink
URL="http://www.cc.gatech.edu/linux/LDP"
>http://www.cc.gatech.edu/linux/LDP</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 <ULink
URL="http://www.redhat.com/mirrors/LDP"
>http://www.redhat.com/mirrors/LDP</ULink
>

</Para>
</ListItem>
<ListItem>

<Para>
 ¶Ç´Â ´ÙÀ½ ÆäÀÌÁö¿¡¼­ °¡±î¿î ¹Ì·¯»çÀÌÆ®¸¦ ã¾Æº¼ ¼öµµ ÀÖ´Ù.
<ULink
URL="http://www.linuxdoc.org/mirrors.html"
>http://www.linuxdoc.org/mirrors.html</ULink
>
site¸¦ Çϳª °ñ¶ó¼­ /LDP/HOWTO/xxxx-HOWTO.htmlÀ» ã¾Æ°¡¸é µÈ´Ù.
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>

<ItemizedList>
<ListItem>
<Para>
ÀÌ ¹®¼­ÀÇ HTML, DVI, Postscript ȤÀº SGML ÆÄÀÏÀÇ tar-ballÀ»
´ÙÀ½ ÁÖ¼Ò¿¡¼­ ¹ÞÀ» ¼ö ÀÖ´Ù.
<ULink
URL="ftp://www.linuxdoc.org/pub/linux/docs/HOWTO/other-formats/"
>ftp://www.linuxdoc.org/pub/linux/docs/HOWTO/other-formats/</ULink
>
¿Í <ULink
URL="http://www.linuxdoc.org/docs.html#howto"
>http://www.linuxdoc.org/docs.html#howto</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
Plain text Æ÷¸ËÀº : <ULink
URL="ftp://www.linuxdoc.org/pub/linux/docs/HOWTO"
>ftp://www.linuxdoc.org/pub/linux/docs/HOWTO</ULink
>
¿Í <ULink
URL="http://www.linuxdoc.org/docs.html#howto"
>http://www.linuxdoc.org/docs.html#howto</ULink
>
</Para>
</ListItem>
<ListItem>
<Para>
ÇϳªÀÇ HTML ÆÄÀÏÀº :
<ULink
URL="http://www.linuxdoc.org/docs.html#howto"
>http://www.linuxdoc.org/docs.html#howto</ULink
>

 ÇϳªÀÇ HTML ÆÄÀÏÀº ´ÙÀ½ÀÇ ¸í·ÉÀ¸·Î ¸¸µé¾îÁú ¼ö ÀÖ´Ù. (sgml2htmlÀÇ man page¸¦ º¸¶ó)
sgml2html -split 0   xxxxhowto.sgml

</Para></ListItem>
<ListItem>

<Para>
ÇÁ¶û½º¾î, µ¶ÀϾî, ½ºÆäÀξî, Áß±¹¾î, ÀϺ»¾î µîÀÇ ¹ø¿ªÀº 
<ULink
URL="ftp://www.linuxdoc.org/pub/linux/docs/HOWTO"
>ftp://www.linuxdoc.org/pub/linux/docs/HOWTO</ULink
>
¿Í <ULink
URL="http://www.linuxdoc.org/docs.html#howto"
>http://www.linuxdoc.org/docs.html#howto</ULink
>
¿¡¼­ ãÀ» ¼ö ÀÖ´Ù.
¶Ç ´Ù¸¥ ¾ð¾î·ÎÀÇ ¹ø¿ª¶ÇÇÑ È¯¿µÇÑ´Ù.
</Para>
</ListItem>

</ItemizedList>

ÀÌ ¹®¼­´Â<ULink
URL="http://www.sgmltools.org"
>http://www.sgmltools.org</ULink
>¿¡¼­ ãÀ» ¼ö ÀÖ´Â  "SGML-Tools"·Î ¾²¿©Á³´Ù.

¼Ò½º¸¦ ÄÄÆÄÀÏÇÏ·Á¸é ´ÙÀ½°ú °°ÀÌ ÇÏ¸é µÈ´Ù.

<ItemizedList>
<ListItem>

<Para>
sgml2html xxxxhowto.sgml     (html ¸¸µé±â)
</Para>
</ListItem>
<ListItem>

<Para>
sgml2html -split 0   xxxxhowto.sgml (ÇϳªÀÇ html file·Î ¸¸µé±â)
</Para>
</ListItem>
<ListItem>

<Para>
sgml2rtf  xxxxhowto.sgml     (RTF file¸¸µé±â)
</Para>
</ListItem>
<ListItem>

<Para>
sgml2latex xxxxhowto.sgml    (latex file¸¸µé±â)
</Para>
</ListItem>

</ItemizedList>

</Para>

<Sect2 id="acrobatpdf">
<Title>Acrobat PDF Æ÷¸Ë </Title>

<Para>
PDF ÆÄÀÏÀº  acrobatÀÇ <Emphasis remap="bf">distill</Emphasis>À̳ª
<Emphasis remap="bf">Ghostscript</Emphasis>¸¦ »ç¿ëÇؼ­ Postscript ÆÄÀϷκÎÅÍ ¸¸µé ¼ö ÀÖ´Ù.
±×¸®°í Postscript ÆÄÀÏÀº LaTex ÆÄÀϷκÎÅÍ ¸¸µé¾îÁö´Â DVIÆÄÀÏ·Î ¸¸µé ¼ö ÀÖ´Ù.
distill ¼ÒÇÁÆ®¿þ¾î´Â 
<ULink URL="http://www.adobe.com" >http://www.adobe.com</ULink >. 
¿¡¼­ ¹ÞÀ» ¼ö ÀÖ´Ù.

¾Æ·¡ÀÇ ¿¹Á¦¸¦ º¸¶ó.
<ProgramListing>
bash$ man sgml2latex
bash$ sgml2latex filename.sgml
bash$ man dvips
bash$ dvips -o filename.ps filename.dvi
bash$ distill filename.ps
bash$ man ghostscript
bash$ man ps2pdf
bash$ ps2pdf input.ps output.pdf
bash$ acroread output.pdf &#38;
</ProgramListing>
ȤÀº <Emphasis remap="bf">ps2pdf</Emphasis> °°Àº Ghostsciprt ¸í·É¾î¸¦
»ç¿ëÇÒ ¼öµµ ÀÖ´Ù. ps2pdf´Â AdobeÀÇ Acrobat Distiller¿Í °ÅÀÇ °°Àº ¿ªÇÒÀ»
ÇÑ´Ù (Áï, PostScript ÆÄÀÏÀ» PDF·Î ¹Ù²Û´Ù)
<Emphasis remap="bf">ps2pdf</Emphasis> ´Â Ghostscript¸¦ ½ÇÇà½ÃÅ°°í,
<Emphasis remap="bf">pdfwrite</Emphasis>¶ó´Â Ưº°ÇÑ "Ãâ·ÂÀåÄ¡"¸¦ »ç¿ëÇÏ´Â
ÀÛÀº ½ºÅ©¸³Æ®ÀÌ´Ù. ps2pdf¸¦ »ç¿ëÇϱâ À§Çؼ­´Â pdfwrite ÀåÄ¡°¡ Ghostscript ÄÄÆÄÀÏ ½Ã¿¡
Makefile¿¡ Æ÷ÇԵǾîÀÖ¾î¾ß ÇÑ´Ù.
ÀÚ¼¼ÇÑ ³»¿ëÀº ÇØ´ç ¹®¼­¸¦ º¸µµ·Ï Çضó.
</Para>

</Sect2>

<Sect2 id="linuxdoc2docbook">
<Title>linuxdoc À» Docbook Æ÷¸ËÀ¸·Î ¹Ù²Ù±â </Title>

<Para>
ÀÌ ¹®¼­´Â linuxdoc SGML Æ÷¸ËÀ¸·Î ¾²¿©Á³´Ù. Docbook SGML Æ÷¸ËÀº
linuxdoc Æ÷¸ËÀ» Æ÷ÇÔÇÏ°í, ´õ ¸¹Àº ±â´ÉÀ» °®°í ÀÖ´Ù.
linuxdocÀº °£´ÜÇÏ°í »ç¿ëÇϱ⠽±´Ù. linuxdoc SGMLÆÄÀÏÀ»
Docbook SGML·Î ¹Ù²Ù·Á¸é <Emphasis remap="bf">ld2db.sh</Emphasis> ÇÁ·Î±×·¥°ú
¸î¸î perl ½ºÅ©¸³Æ®¸¦ »ç¿ëÇضó.
ld2db¿¡¼­ ¾ò¾îÁö´Â °ÍÀº 100&percnt; ±ú²ýÇÑ °ÍÀÌ ¾Æ´Ï°í, 
<Emphasis remap="bf">clean&lowbar;ld2db.pl</Emphasis> perl ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÒ
Çʿ伺ÀÌ »ý±ä´Ù. ¶ÇÇÑ, Á÷Á¢ ¹®¼­¿¡¼­ ¸î¸îÀ» °íÃľßÇÒ ¼öµµ ÀÖ´Ù.
<ItemizedList>
<ListItem>

<Para>
 ld2db ÇÁ·Î±×·¥Àº <ULink
URL="http://www.dcs.gla.ac.uk/~rrt/docbook.html"
>http://www.dcs.gla.ac.uk/~rrt/docbook.html</ULink
>
À̳ª <ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>Milkyway Galaxy site</ULink
>¿¡¼­ ¹ÞÀ¸¸é µÈ´Ù.
</Para>
</ListItem>
<ListItem>

<Para>
cleanup&lowbar;ld2db.pl perl script ´Â
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>Milkyway Galaxy site</ULink
>¿¡¼­ ¹ÞÀ¸¸é µÈ´Ù.
</Para>
</ListItem>

</ItemizedList>

ld2db.sh ´Â 100&percnt; ±ú²ýÇÏÁö ¾Ê¾Æ¼­, ´ÙÀ½ °ú°°ÀÌ ½ÇÇàÇÏ·Á¸é ¿¡·¯°¡ ³¯ °ÍÀÌ´Ù.

<ProgramListing>
	bash$ ld2db.sh file-linuxdoc.sgml db.sgml
	bash$ cleanup.pl db.sgml &#62; db_clean.sgml
	bash$ gvim db_clean.sgml 
	bash$ docbook2html db.sgml
</ProgramListing>
¶ÇÇÑ, perl ½ºÅ©¸³Æ®¸¦ µ¹¸° ÈÄ¿¡ ¸î¸î ÀÛÀº ¿¡·¯¸¦ °íÄ¡°í ½Í±âµµ ÇÒ °ÍÀÌ´Ù.
¿¹¸¦µé¾î, &#60;/Para&#62;¸¦ ¸Å &#60;Listitem&#62;¸¶´Ù ³ÖÀ» ÇÊ¿ä°¡ ÀÖÀ» ¼öµµ ÀÖ´Ù.
</Para>

</Sect2>

<Sect2 id="mswinhelp">
<Title>MS WinHelp Æ÷¸ËÀ¸·Î ¹Ù²Ù±â</Title>

<Para>
SGML Howto¸¦ Microsoft Windows Help ÆÄÀÏ·Î ¹Ù²Ü ¼öµµ ÀÖ´Ù.
¸ÕÀú, sgmlÀ» ´ÙÀ½°ú °°ÀÌ html·Î ¹Ù²ã¶ó.

<ProgramListing>
	bash$ sgml2html xxxxhowto.sgml     (html ÆÄÀÏ ¸¸µé±â)
	bash$ sgml2html -split 0   xxxxhowto.sgml (ÇϳªÀÇ html ÆÄÀÏ·Î ¸¸µé±â)
</ProgramListing>

±×¸®°í <ULink
URL="http://Javadocs.planetmirror.com/htmltohlpe.html"
>HtmlToHlp</ULink
>À̶ó´Â ÅøÀ» ¾²¸é µÈ´Ù.
¶ÇÇÑ, winhelp ÆÄÀÏÀ» ¸¸µé±â À§ÇØ sgml2rtf¸¦ ¾´´ÙÀ½, RTFÆÄÀÏÀ» ¾µ ¼öµµ ÀÖ´Ù.
</Para>

</Sect2>

<Sect2 id="readformats">
<Title>¿©·¯°¡Áö Æ÷¸ËÀÇ ¹®¼­¸¦ Àбâ</Title>

<Para>
dvi Æ÷¸ËÀÇ ¹®¼­¸¦ º¸±â À§Çؼ­´Â, xdvi ÇÁ·Î±×·¥À» »ç¿ëÇضó.
xdvi ÇÁ·Î±×·¥Àº Redhat ¸®´ª½ºÀÇ °æ¿ì ControlPanel &verbar; Applications &verbar; Publishing &verbar; Tex menu ¹öÆ°¿¡ ÀÖ°í, tetex-xdvi*.rpm ÆÐÅ°Áö¿¡ µé¾îÀÖ´Ù.
dvi ¹®¼­¸¦ ÀÐÀ¸·Á¸é ´ÙÀ½°ú °°Àº ¸í·ÉÀ» ¾²¸é µÈ´Ù.

<Screen>
	xdvi -geometry 80x90 howto.dvi
	man xdvi
</Screen>

±×¸®°í À©µµ¿ì Å©±â¸¦ ¸¶¿ì½º·Î Á¶Á¤ ÇÑ´Ù.
À̸®Àú¸® »ìÇ¥º¸±â À§Çؼ­´Â È­»ìǥŰ³ª PageUp, PageDownÅ°, ±×¸®°í
'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' Å° µîÀ» À§, ¾Æ·¡ Áß¾ÓÀ¸·Î ¿òÁ÷À̰ųª
´ÙÀ½ÆäÀÌÁö, ÀÌÀüÆäÀÌÁö µîÀ¸·Î ³Ñ±â±â À§ÇØ ¾µ ¼ö ÀÖ´Ù.
expert ¸Þ´º¸¦ ²ô±â À§Çؼ­´Â 'x'¸¦ ´©¸£¸é µÈ´Ù.
</Para>

<Para>
Postscript ÆÄÀÏÀ» Àбâ À§Çؼ­´Â 'gv'(ghostview)ÇÁ·Î±×·¥À̳ª 'ghostscript'¸¦
¾²¸é µÈ´Ù.
ghostscript ÇÁ·Î±×·¥Àº ghostscript*.rpm ÆÐÅ°Áö¿¡ ÀÖ°í, gv ÇÁ·Î±×·¥Àº
gv*.rpm ÆÐÅ°Áö¿¡ µé¾îÀÖ´Ù. À̵éÀº 
ControlPanel &verbar; Applications &verbar; Graphics menu ¹öÆ°¿¡ ÀÖ´Ù.
gv ÇÁ·Î±×·¥ÀÌ ghostscriptº¸´Ù ÈξÀ »ç¿ëÇϱâ ÆíÇÏ´Ù.
ghostscript¿Í gv ´Â À©µµ¿ì³ª OS/2 µî ´Ù¸¥ Ç÷§Æû¿¡¼­µµ »ç¿ë°¡´ÉÇÏ´Ù.
</Para>

<Para>

<ItemizedList>
<ListItem>

<Para>
À©µµ¿ì, OS/2µî ¸ðµç OS¸¦ À§ÇÑ ghostsciprt´Â ´ÙÀ½ »çÀÌÆ®¿¡ ÀÖ´Ù.
<ULink
URL="http://www.cs.wisc.edu/~ghost"
>http://www.cs.wisc.edu/~ghost</ULink
>
</Para>
</ListItem>

</ItemizedList>

</Para>

<Para>
Postscript ¹®¼­¸¦ Àбâ À§Çؼ­´Â ´ÙÀ½°ú °°ÀÌ ÇÏ¸é µÈ´Ù - 
<Screen>
		gv howto.ps
		ghostscript howto.ps
</Screen>

</Para>

<Para>
HTML Æ÷¸ä ¹®¼­´Â Netscape Navigator, Microsoft Internet explorer,
Redhat Baron Web browser ³ª ´Ù¸¥ À¥ºê¶ó¿ìÀú·Î ÀÐÀ¸¸é µÈ´Ù.
</Para>

<Para>
latex, LyX ´Â latexÀÇ X-Window ÇÁ·ÐÆ®¿£µåÀÎ LyX ·Î ÀÐÀ¸¸é µÈ´Ù.
</Para>

</Sect2>

</Sect1>

<Sect1>
<Title>´Ù¸¥ ¾ð¾î·ÎÀÇ ¹ø¿ª</Title>

<Para>

<ItemizedList>
<ListItem>

<Para>
 Æú¶õµå¾î·ÎÀÇ ¹ø¿ªÀº <ULink
URL="http://strony.wp.pl/wp/chq/c/howto/book1.htm"
>http://strony.wp.pl/wp/chq/c/howto/book1.htm</ULink
>¿¡ ÀÖ´Ù. ( Darek Ostolski ¿¡°Ô °¨»ç~ : 
<ULink
URL="mailto:chq[at]wp.pl"
>Darek Ostolski</ULink
> )
</Para>
</ListItem>
<ListItem>

<Para>
ÇÁ¶û½º¾î³ª µ¶ÀϾî, ½ºÆäÀξî, Áß±¹¾î, ÀϺ»¾î µîÀ¸·ÎÀÇ ¹ø¿ªÀº
<ULink
URL="ftp://www.linuxdoc.org/pub/linux/docs/HOWTO"
>ftp://www.linuxdoc.org/pub/linux/docs/HOWTO</ULink
>
³ª <ULink
URL="http://www.linuxdoc.org/docs.html#howto"
>http://www.linuxdoc.org/docs.html#howto</ULink
>¿¡¼­ ãÀ¸¸é µÈ´Ù.
</Para>
</ListItem>

</ItemizedList>

´Ù¸¥ ¾ð¾î·ÎÀÇ ¹ø¿ªÀº ȯ¿µÇÑ´Ù.
</Para>

</Sect1>

<Sect1>
<Title>Copyright</Title>

<Para>
Copyright´Â LDP(¸®´ª½º ¹®¼­È­ ÇÁ·ÎÁ§Æ®)¿¡ µû¶ó GNU/GPLÀÌ´Ù.
LDP´Â GNU/GPL ÇÁ·ÎÁ§Æ® ÀÌ´Ù.
ºÎ°¡ÀûÀÎ ¿ä±¸»çÇ×Àº ÀúÀÚÀÇ À̸§°ú À̸ÞÀÏÁÖ¼Ò, ÀÌ Copyright ¸¦ ¾ðÁ¦³ª
Æ÷ÇÔ½ÃÄÑ´Þ¶ó´Â °ÍÀÌ´Ù.
¸¸¾à º¯°æÀ̳ª Ãß°¡ÇÒ »çÇ×ÀÌ ÀÖÀ¸¸é ÀÌ ¹®¼­ÀÇ ÀúÀڵ鿡°Ô ¾Ë·ÁÁֱ⠹ٶõ´Ù.
ÀÌ ¹®¼­¿¡ ¾ð±ÞµÈ ȸ»çÀ̸§À̳ª »óÇ¥´Â °¢°¢ ±× ¼ÒÀ¯ÁÖÀÇ °ÍÀÌ´Ù.

Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
LDP is a GNU/GPL project.
Additional requests are that you retain the author's name, email address
and this copyright notice on all the copies. If you make any changes 
or additions to this document then you please 
intimate all the authors of this document.
Brand names mentioned in this document are property of their respective 
owners.
</Para>

</Sect1>

<Sect1 id="APPENDIX-A">
<Title>ºÎ·Ï A String ÇÁ·Î±×·¥ ÆÄÀÏ</Title>

<Para>
<Emphasis remap="bf">¸ðµç ÇÁ·Î±×·¥ ÆÄÀÏÀ» ÇϳªÀÇ tar.gz À¸·Î</Emphasis> 
<XRef LinkEnd="Download-String">¿¡¼­ ¹ÞÀ» ¼ö ÀÖ´Ù.
±×¸®°í ¾ÐÃàÀ» ´ÙÀ½°ú °°ÀÌ Ç®¸é µÈ´Ù.

<ProgramListing>
bash$ man tar
bash$ tar ztvf C++Programming-HOWTO.tar.gz
ÀÌ´Â ¾ÐÃàµÈ ÆÄÀϵéÀ» º¸¿©ÁÙ °ÍÀÌ´Ù.

bash$ tar zxvf C++Programming-HOWTO.tar.gz
ÀÌ´Â ¾ÐÃàÀ» ½ÇÁ¦·Î Ç® °ÍÀÌ´Ù.
</ProgramListing>

</Para>

<Para>

<ItemizedList>
<ListItem>
<Para>
 Çì´õÆÄÀÏÀ» ¸ÕÀú Àаí, ¿¹Á¦ cppÆÄÀÏÀ» º¸¾Æ¶ó.

<ItemizedList>
<ListItem>

<Para>
 String.h
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/String.h"
>http://www.angelfire.com/country/aldev0/cpphowto/String.h</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 StringBuffer.h
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/StringBuffer.h"
>http://www.angelfire.com/country/aldev0/cpphowto/StringBuffer.h</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 StringTokenizer.h
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/StringTokenizer.h"
>http://www.angelfire.com/country/aldev0/cpphowto/StringTokenizer.h</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 StringRW.h
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/StringRW.h"
>http://www.angelfire.com/country/aldev0/cpphowto/StringRW.h</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 string&lowbar;multi.h
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/string_multi.h"
>http://www.angelfire.com/country/aldev0/cpphowto/string_multi.h</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 example&lowbar;String.cpp 
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>example_String.cpp</ULink
>
'Source code of C++ howto'À» Ŭ¸¯Çضó.
</Para>
</ListItem>

</ItemizedList>

</Para>
</ListItem>
<ListItem>
<Para>
 ÆÄÀÏ °ü¸® class. length() ÇÔ¼ö¸¸ ±¸ÇöµÇ¾ú´Ù.

<ItemizedList>
<ListItem>

<Para>
 File.h
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/File.h"
>http://www.angelfire.com/country/aldev0/cpphowto/File.h</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 File.cpp
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>File.cpp</ULink
>
'Source code of C++ howto'¸¦ Ŭ¸¯Ç϶ó.
</Para>
</ListItem>

</ItemizedList>

</Para>
</ListItem>
<ListItem>
<Para>
 zap() ÇÔ¼öÀÇ ±¸ÇöÀº ¾Æ·¡ ¸µÅ©¿¡ ÀÖ´Ù.

<ItemizedList>
<ListItem>

<Para>
 my&lowbar;malloc.h
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/my_malloc.h"
>http://www.angelfire.com/country/aldev0/cpphowto/my_malloc.h</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 my&lowbar;malloc.cpp
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>my_malloc.cpp</ULink
>
'Source code of C++ howto'¸¦ Ŭ¸¯Çضó.
</Para>
</ListItem>

</ItemizedList>

</Para>
</ListItem>
<ListItem>
<Para>
 String classÀÇ ±¸Çö.

<ItemizedList>
<ListItem>

<Para>
 String.cpp
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>String.cpp</ULink
>
'Source code of C++ howto'¸¦ Ŭ¸¯Çضó.
</Para>
</ListItem>
<ListItem>

<Para>
 StringTokenizer.cpp
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>StringTokenizer.cpp</ULink
>
'Source code of C++ howto'¸¦ Ŭ¸¯Çضó.
</Para>
</ListItem>
<ListItem>

<Para>
 StringBuffer.cpp
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>StringBuffer.cpp</ULink
>
'Source code of C++ howto'¸¦ Ŭ¸¯Çضó.
</Para>
</ListItem>
<ListItem>

<Para>
 StringRW.cpp
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>StringRW.cpp</ULink
>
'Source code of C++ howto'¸¦ Ŭ¸¯Çضó.
</Para>
</ListItem>

</ItemizedList>

</Para>
</ListItem>
<ListItem>
<Para>
 µð¹ö±ë µµ±¸µé .. 

<ItemizedList>
<ListItem>

<Para>
 debug.h
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/debug.h"
>http://www.angelfire.com/country/aldev0/cpphowto/debug.h</ULink
>
</Para>
</ListItem>
<ListItem>

<Para>
 debug.cpp
<ULink
URL="http://www.milkywaygalaxy.freeservers.com"
>debug.cpp</ULink
>
'Source code of C++ howto'¸¦ Ŭ¸¯Çضó.
</Para>
</ListItem>
<ListItem>

<Para>
 Makefile.unx
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/Makefile.unx"
>http://www.angelfire.com/country/aldev0/cpphowto/Makefile.unx</ULink
>
</Para>
</ListItem>

</ItemizedList>


</Para>
</ListItem>
<ListItem>

<Para>
String classÀÇ ÀÛµ¿À» Å×½ºÆ®Çϱâ À§ÇÑ ¿¹½Ã¿ë ÀÚ¹Ù ÆÄÀÏ.

<ItemizedList>
<ListItem>

<Para>
 string.java
<ULink
URL="http://www.angelfire.com/country/aldev0/cpphowto/string.java"
>http://www.angelfire.com/country/aldev0/cpphowto/string.java</ULink
>
</Para>
</ListItem>

</ItemizedList>


</Para>
</ListItem>

</ItemizedList>

</Para>

</Sect1>

</Article>