1588, 78/80 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   sihun1113
   <»þ¿À¾² Ÿ·Î>5.¾È³»¹®Ç¥½Ãpri.h

http://www.hackerschool.org/HS_Boards/zboard.php?id=Free_Lectures&no=1785 [º¹»ç]


¿ì¼± ¾È³»¹®Àº Àú¹ø°­Á¿¡ ¿Ã¸±·Á°í ÇßÀ¸³ª ³»¿ëÀÌ ±æ¾î¼­ µû·Î ÃßÃâÇؼ­ ¿Ã·Áµå¸³´Ï´Ù.





ÀÚ.À̹ø °­Á´ ¾È³»¹® ¸¸µé±âÀÔ´Ï´Ù.



±×³É »ý°¢Çغ¸¸é º°°Í ¾ø¾îº¸ÀÔ´Ï´Ù.



cout¸¸ ÇÏ¸é µÇÀݾÆ~ ¶ó°í »ý°¢ÇϽô ºÐµéÀÌ ´ëºÎºÐÀÌ½Ç °Å¶ó°í »ý°¢ÇÕ´Ï´Ù.



ÇÏÁö¸¸ Àúó·³ JQ°¡ ¶Ù¾î³­(§¸Ó¸®) ºÐµéÀº ÀçÅÁ(ÀçÈ°¿ë¼º)À» »ý°¢ÇϽÃÁö¿ä



±×·¡¼­ ¸¸µé¾ú½À´Ï´Ù.





ÀÚÀÚ..JQ§¸Ó¸®ÀÇ »ê½Ç..



      private:

              //¾È³»¹®
              string ct1;//Áß°£ ¾È³»¹® 1ÆäÀÌÁö 1¹ø° ÁÙ
              string ct2;//Áß°£ ¾È³»¹® 1ÆäÀÌÁö 2¹ø° ÁÙ
              string ct3;//Áß°£ ¾È³»¹® 1ÆäÀÌÁö 3¹ø° ÁÙ
              string ct4;//Áß°£ ¾È³»¹® 1ÆäÀÌÁö 4¹ø° ÁÙ
              string ct5;//Áß°£ ¾È³»¹® 2ÆäÀÌÁö 1¹ø° ÁÙ
              string ct6;//Áß°£ ¾È³»¹® 2ÆäÀÌÁö 2¹ø° ÁÙ
              string ct7;//Áß°£ ¾È³»¹® 2ÆäÀÌÁö 3¹ø° ÁÙ
              string ct8;//Áß°£ ¾È³»¹® 2ÆäÀÌÁö 4¹ø° ÁÙ
              string ct9;//Áß°£ ¾È³»¹® 3ÆäÀÌÁö 1¹ø° ÁÙ
              string ct10;//Áß°£ ¾È³»¹® 3ÆäÀÌÁö 2¹ø° ÁÙ
              string ct11;//Áß°£ ¾È³»¹® 3ÆäÀÌÁö 3¹ø° ÁÙ
              string ct12;//Áß°£ ¾È³»¹® 3ÆäÀÌÁö 4¹ø° ÁÙ
              string ct0;//Áß°£ ¾È³»¹® ÁÙ Áö¿ì±â

              int pp;//Áß°£ ¾È³»¹® ÆäÀÌÁö º¯¼ö ±âº»Àº0À¸·Î1ÆäÀÌÁö 2´Â2p 3Àº 3pÀÌ´Ù.



ÀÔ´Ï´Ù..ÃÑ Áß°£ ¾È³»¹®Àº ÃÖ´ë 3ÆäÀÌÁö°¡ µÇ±¸¿ä



ÀÌ·¸°Ô stringÀ» ³²¹ßÇÏ´Â Åõ¹ÚÇÑ ÇÁ·Î±×·¡¹ÖÀ» Çϼŵµ µÇ¸ç



¹è¿­·Î ±ò²ûÇÏ°Ô Ã³¸®¸¦ Çϼŵµ µË´Ï´Ù.



°¢ÀÚÀÇ ÃëÇâ°ú ½Ç·Â¿¡ ¸Ã±æ°Ô¿ä. Àü ÀÏ´Ü Åõ¹ÚÇÏ°Ô ÀÏÀÏÈ÷ ´ÙÇß½À´Ï´Ù.



¿Ö stringÀ» ¸¹ÀÌ ¸¸µé¾ú´À³Ä°í¿ä?



À½ ´ëÃæ ´«Ä¡ ä½ÅºÐµéµµ º¸À̴±º¿ä.



±×·¸½À´Ï´Ù. ¾È³»¹®À» Ãâ·ÂÇÒ¶§Ä«´Ù coutÀ» ÇÏÁö¾Ê°í ÀúÀ§ÀÇ stringµéÀ» coutÇØÁÖ´Â ÇÔ¼ö¸¦ ºÒ·¯¿À±â À§Çؼ­ÀÔ´Ï´Ù.



ct1~ct12±îÁöÀÇ ³»¿ë¸¸ ¹Ù²ãÁÖ°í coutÀ» ÇØÁÖ´Â ÇÔ¼ö¸¦ µû·Î¸¸µé¾î È£Ã⸸ÇϰԵǸé



¼Ò½ºÀÇ ±æÀÌ´Â ´õ ÁÙ¾îµé°ÚÁö¿ä.



ÀÚ ¿¹¸¦ µé¾îº¸ÀÌ°Ú½À´Ï´Ù.



                             else if(imenu==2)//Á¾·á°¡ ¼±ÅõǾî ÀÖÀ¸¸é
                             {
                                        //Áß°£ ¾È³»¹® ³»¿ë ÀúÀå
                                        helpcho();//ctÃʱâÈ­.
                                        ct1="ÀÚ½ÅÀÇ ¿îÀº";
                                        ct2="Ÿ°í ³ªÁö¸¸";
                                        ct3="±× ¿îÀÇ °á°ú´Â";
                                        ct4="ÀÚ½ÅÀÌ ¸¸µé¾î°¡´Â °Í";
                                        ct5="¹Ì·¡¸¦ À§ÇÑ";
                                        ct6="ÀÚ½ÅÀÌ µÇ½Ã±æ¹Ù·¡¿ä.";
                                        pp=2;//Áß°£ ¾È³»¹® ÆäÀÌÁö°¡ 2ÆäÀÌÁöÀÓ.
                                        centerhelp(); //Áß°£ ¾È³»¹® Ãâ·Â
                                        gotoxy(0,30);
                                        break;
                             }



¸Þ´º¿¡¼­ Á¾·á¸¦ ¼±ÅÃÇÒ °æ¿ìÀÇ ¾È³»¹® Ãâ·ÂºÎºÐÀÔ´Ï´Ù.



ÀÌ·¸°Ô ctµéÀÇ ³»¿ëÀ» ¹Ù²Û´ÙÀ½ centerhelp(); ÇÔ¼ö·Î coutÀ» ÇØÁÖ°Ô µÇ¸é Á»´õ ¼Ò½º°¡ ª¾ÆÁö°Ô µË´Ï´Ù.



helpcho´Â ctµéÀÇ ³»¿ëÀ» ""À¸·Î ¸¸µé°í Àüü Ãâ·ÂÀ» ÇØÁÜÀ¸·Î½á À̹ÌÃâ·ÂµÈ ¾È³»¹®À» Áö¿ì°Ô ¸¸µå´Â ºÎºÐÀÔ´Ï´Ù.



¿ì¼± centerhelp(); ¸ÕÀú º¸Áö¿ä



void pri::centerhelpnos()
{
     WHITE;
     helpclr();
     //ù ÆäÀÌÁö Ãâ·Â
     gotoxy(33,10);
     cout<<ct1;
     gotoxy(35,12);
     cout<<ct2;
     gotoxy(37,14);
     cout<<ct3;
     gotoxy(39,16);
     cout<<ct4;
     if(pp>=2)//¸¸¾à ¾È³»ÆäÀÌÁöÂʼö°¡ 2ÆäÀÌÁö ÀÌ»óÀ̸é
     {
     //ÆäÀÌÁö Áö¿ì°í
     helpclr();
     //µÎ¹ø° ÆäÀÌÁö Ãâ·Â
     gotoxy(33,10);
     cout<<ct5;
     gotoxy(35,12);
     cout<<ct6;
     gotoxy(37,14);
     cout<<ct7;
     gotoxy(39,16);
     cout<<ct8;
       if(pp==3)//¸¸¾à ¾È³»ÆäÀÌÁö¼ö°¡ 3ÆäÀÌÁöÀ̸é
       {
                    //ÆäÀÌÁö Áö¿ì°í
                    helpclr();
                    //¼¼¹ø° ÆäÀÌÁö Ãâ·Â
                    gotoxy(33,10);
                    cout<<ct9;
                    gotoxy(35,12);
                    cout<<ct10;
                    gotoxy(37,14);
                    cout<<ct11;
                    gotoxy(39,16);
                    cout<<ct12;
       }    
     }
}



¿äŽó°í·Ò ÇØÄ¡¿ö ¹ö¸®´Â°Ì´Ï´Ù.



±×·³ gotoxy¿ÍcoutÀ» È®½ÇÈ÷ ÁÙÀϼö ÀÖ°ÔµÇÁÒ.



¿©±â¼­ pp´Â µüº¸°í ¾Æ¼Ì°ÚÁö¸¸ ÆäÀÌÁö ¼ýÀÚÀÔ´Ï´Ù.



¸ðµç ¾È³»¹®ÀÇ ÆäÀÌÁö°¡ °°À» ¼ö´Â ¾øÀݾƿä^^



ÀÌ ¼Ò½º¿¡ Sleep¹®À» °É°ÔµÇ¸é ÆäÀÌÁö°¡ Â÷·Ê´ë·Î º¸ÀÌ°Ô µÇ´Â°Ì´Ï´Ù.





À§¿¡ ¼Ò½º¸¦ º¸´Ï helpclr();´Â ´õ¿í ½±°ÚÁÒ?



³×..¾Æ·¡Ã³·³ °£´ÜÇÏ°Ô ¾È³»¹®À» Áö¿öÁÖ´Â ºÎºÐÀ» ¸¸µé¼ö ÀÖ½À´Ï´Ù.



void pri::helpclr()//Áß°£ ¾È³»¹® Áö¿ì±â ±¸Çö
{
     string ct0="                       ";//Áß°£ ¾È³»¹® ÁÙ Áö¿ì±â ±¸Çö
     gotoxy(33,10);
     cout<<ct0;
     gotoxy(35,12);
     cout<<ct0;
     gotoxy(37,14);
     cout<<ct0;
     gotoxy(39,16);
     cout<<ct0;
}



ÀÌ·¸°Ô ¾È³»¹®ÀÇ ±¸ÇöÀº



string¿¡ ³»¿ëÀ» ³Ö°í stringÀ» ¾ç½Ä¿¡¸ÂÃçÃâ·ÂÇØÁÖ´Â ÇÔ¼ö¸¦ È£ÃâÇϴ°ÍÀ¸·Î ÇØ°áµË´Ï´Ù.



´Ù..ÀÌ·± ³»¿ëµéÀ» class¾È¿¡ ³ÖÀº ¸ð½ÀÀº ´ÙÀ½°­Á¿¡ 1~5°­ ÃѼҽº¸¦ ¿Ã·Áµå¸®°Ú½À´Ï´Ù.
[Ãâó] <»þ¿À¾² Ÿ·Î>5.¾È³»¹®Ç¥½Ãpri.h (C¾ð¾î¸¦ ¹è¿ìÀÚ) |ÀÛ¼ºÀÚ ÇØĿǪ


  Hit : 7345     Date : 2011/06/04 08:20



    
dkdkfjgh [Ãâó] <»þ¿À¾² Ÿ·Î>5.¾È³»¹®Ç¥½Ãpri.h (C¾ð¾î¸¦ ¹è¿ìÀÚ) |ÀÛ¼ºÀÚ ÇØĿǪ


Ãâó´Â ³²°Üµµ.... Æ÷ÀÎÆ® ¾òÀ¸½Ç·Á±¸ Çã¶ôµµ ¾È¹Þ°í ¸· ÆÛ¿À½Ã¸é ÀúÀ۱ǹý À§¹ÝÀΰŠ¾Æ½ÃÁÒ??
2011/07/25  
48   * printf »ç¿ë¹ý     limjongmin
08/20 7079
47   * for¹® »ç¿ë¹ý[2]     limjongmin
08/20 7460
46   * ȨÆäÀÌÁö ÇØÅ· * ÁÁÀºÀÚ·á *[7]     HackerMapia
02/22 11334
45   * ÇØÄ¿¸¦ À§ÇÑ ·¹Áö½ºÆ®¸® ÇغΠ°­Á *[2]     HackerMapia
02/24 11369
44   * ÇØÄ¿°¡ ¾Ë¾Æ¾ßÇÒ 30°¡Áö *[2]     HackerMapia
02/22 10069
43   * ÇØÄ¿°¡ µÇ°í½Í³ª ? *[19]     HackerMapia
03/01 13226
42   * ÇØÄ¿ÀÇ ºÐ·ù *[6]     HackerMapia
02/22 8272
41   * ÇØÅ·¿µÈ­ º¼¸¸ÇÑ°Å *[5]     HackerMapia
02/20 12249
40   * ÇØÅ·ÀÇ °ø°Ý±â¼ú *[3]     HackerMapia
03/01 13911
39   * C¾ð¾î¸¦ ²À¹è¿ö¾ßÇϴ°¡ *[2]     HackerMapia
02/21 9120
38   * C C++ *     HackerMapia
03/01 8343
37   * À©µµ¿ì¸¦ ºü¸£°Ô¿­ÀÚ *[6]     HackerMapia
02/24 8047
36   * À©µµ¿ì ´ÜÃàÅ° ¾Æ´Â°Íµé *[7]     HackerMapia
02/20 7822
35   * À©µµ¿ì ÇØÅ·ÀÇ ±âº»¿ø¸® *     HackerMapia
02/21 19107
34   * À©µµ¿ì ÇØÅ·ÀÇ ±âº» ¿ø¸®*[29]     oes2
08/26 13904
33   * À©µµ¿ì Á¾·á¸¦ ºü¸£°Ô *[2]     HackerMapia
02/20 8368
32   * Á¡È­½ÄÀÇ °£´ÜÇÑ ¾Ë°í¸®Áò     limjongmin
08/20 9513
31   * Á¡È­½Ä °£´ÜÇÏ°Ô     limjongmin
08/20 7411
30   * ÀÎÅͳݰ˻öÀÌ ´ÞÀÎÀÌ µÇ´Â 10°¡Áö ¹æ¹ý *[1]     HackerMapia
02/24 8436
29   (²Ä¼ö) L.O.B Çѹ濡 Ŭ¸®¾îÇϱâ[2]     ÇØÅ·ÀßÇÏ°í½Í´Ù
01/14 1877
[1]..[71][72][73][74][75][76][77] 78 [79][80]

Copyright 1999-2024 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org