ÇÁ·Î±×·¡¹Ö

 3204, 1/161 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   tegi83
   ¹®ÀÚ¿­ 3°³¸¦ ³ôÀº¼ø¼­´ë·Î ¿¬°áÇÏ´ÂÇÁ·Î±×·¥ÀÔ´Ï´Ù

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


#include<stdio.h>
#include<string.h>

void concat3(char*,char*,char*,char*);

int main(void)
{
        char str1[50];
        char str2[50];
        char str3[50];
        char constr[150];

        printf("3°³ÀÇ ¹®ÀÚ¿­ ÀÔ·Â:");
        scanf("%s,%s,%s",str1,str2,str3);

        concat3(str1,str2,str3,constr);
        puts(constr);
        return 0;
}

void concat3(char *str1,char *str2,char *str3,char *constr)
{
        if(strcmp(str1,str2)==1)
        {
                if(strcmp(str1,str3)==1)
                {
                        strcpy(constr,str1);
                        if(strcmp(str2,str3)==1)
                        {
                                strcat(constr,str2);
                                strcat(constr,str3);
                        }
                        else
                        {
                                strcat(constr,str3);
                                strcat(constr,str2);
                        }
                }
                else
                {
                        strcpy(constr,str3);
                        if(strcmp(str1,str2)==1){
                                strcat(constr,str1);
                                strcat(constr,str2);
                        }
                        else
                        {
                                strcat(constr,str2);
                                strcat(constr,str1);
                        }
                }
        }
        else
        {
                if(strcmp(str2,str3)==1)
                {
                        strcpy(constr,str2);
                        if(strcmp(str1,str3)==1)
                        {
                                strcat(constr,str1);
                                strcat(constr,str3);
                        }
                        else
                        {
                                strcat(constr,str3);
                                strcat(constr,str1);
                        }
                }
                else
                {
                        strcpy(constr,str3);
                        if(strcmp(str1,str2)==1)
                        {
                                strcat(constr,str1);
                                strcat(constr,str2);
                        }
                        else
                        {
                                strcat(constr,str2);
                                strcat(constr,str1);
                        }
                }
        }
}
¾Æ·¡´Â ¿ö´× À̶ߴµ¥ ¿Ö±×·±Áö;;
±×¸®°í Á¤»óÀûÀ¸·Î µÅÁö¸¦ ¾Ê³×¿ä;;
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(14) : warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(306) : see declaration of 'scanf'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(27) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(30) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(31) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(35) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(36) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(41) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(43) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(44) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(48) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(49) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(57) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(60) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(61) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(65) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(66) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(71) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(74) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(75) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(79) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(80) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>Build log was saved at "file://c:\Documents and Settings\Soul\My Documents\Visual Studio 2008\Projects\ex1\ex1\Debug\BuildLog.htm"
1>ex1 - 0 error(s), 21 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

  Hit : 5502     Date : 2009/06/08 10:06



    
tegi83 Çì´õ ÆÄÀ϶§¹®¿¡ ±×·±°¡;; ÈÉ... 2009/06/08  
md.house ¿ö´×À» Àо¼¼¿ä.
warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
2009/06/08  
tegi83 º¸¾È»óÀÇ ¹®Á¦¶§¹®¿¡ ¿ö´×ÀÌ ¶ß´Â°Ç ¾Ë¾Ñ´Âµ¥ ÄÚµùÀº Ʋ¸®Áö¾ÊÀº°Å°°Àºµ¥ ÇÁ·Î±×·¥ÀÌ ¿Ö¾ÈµÅ´ÂÁú ¸ô¶ó¼­ »ý°¢ÁßÀÔ´Ï´Ù.¤Ð¤Ð 2009/06/08  
tegi83 ¿¡±Ã ´©°¡Á» ¾Ë·ÁÁֽøé;; 2009/06/10  
tegi83 ÈÄ......½ºÄµÇÔ¼ö¿¡ ¿Ö ÄÞ¸¶¸¦ÇÞÁö ¤Ð¤Ð 2009/06/10  
3204   Ä¡Æ®¿£Áø °í¼öºÐ °è½Ç±î¿ä[1]     rjsdudals123
02/15 225
3203   ¿À·ù Á» ã¾ÆÁÖ¼¼¿ä [1]     marunim
05/30 953
3202   c¾ð¾î segmentation fault:11 ¿À·ù Áú¹®µå¸³´Ï´Ù![2]     leebk1124
05/21 2032
3201   C++ÇÔ¼ö°ü·Ã Áú¹®ÀÌ¿¡¿ë!![3]     1999dylee
05/11 1859
3200   ÆÄÀ̽ã Áö¹® µå¸³´Ï´Ù.[1]     kksh1107
04/24 1599
3199   ¸®¹ö½ÌÀÇ ¼¼¹ø¤Š ²É - ¿ª¶û-     nninni79
04/20 2307
3198   ´Þ°í³ª ¹®¼­ ½©ÄÚµå[1]     ghjk645
03/24 1621
3197 ºñ¹Ð±ÛÀÔ´Ï´Ù  c¾ð¾î ¼Ò¼ö °ª     adwefq
04/29 1
3196   C¾ð¾î ¼Ò½ºÁú¹®ÀÔ´Ï´Ù![5]     an0088
01/05 5177
3195   C++ /// ºôµå ¿¡·¯ ¤Ð¤Ð[1]     guichanta
08/23 2411
3194 ºñ¹Ð±ÛÀÔ´Ï´Ù  c¾ð¾î µµ¿ÍÁÖ¼¼¿ä¤Ð¤Ð     su6339
04/06 0
3193   ÇØÅ·À» ¹è¿ì·Á°íÇϴµ¥[3]     zoodem04
03/26 4188
3192   c¾ð¾î¸¦ ¹è¿ì°í½Í¾î¿ä ![7]     dwc07238
02/11 4098
3191   ½ºÅÃÀÌ ½×ÀÌ´Â ¹æÇâ¿¡ °üÇؼ­!![1]     hackxx123
12/10 3535
3190   ÇØÅ·Åø¿¡¼­ ip ¾øÀÌ Çϵ忡 ½É´Â°Å¿¡´Â ¾î¶²°Ô ÀÖÀ»±î¿ä?[2]     aowlrgmlals
11/27 4325
3189   C¾ð¾î Çϴµ¥ double ½Ç¼ö¸¦ ³ÖÀºµ¥ ÀÚ²Ù 0.0ÀÌ ³ª¿Í¿ä[2]     fatou10336
11/20 3786
3188   dumpcode.h ÀÌÇØÁ» µµ¿ÍÁÖ¼¼¿ä .[1]     cm6418
11/06 3758
3187   c¾ð¾î ¾Ë°í¸®Áò Áú¹®ÀÔ´Ï´Ù.[3]     alstn8150
10/12 3769
3186     [re] c¾ð¾î ¾Ë°í¸®Áò Áú¹®ÀÔ´Ï´Ù.     dafher
05/13 1597
3185   c¾ð¾î ¼Ò½º Áú¹® ¹¹°¡ ¹®Á¦ÀÎÁö¤Ì¤Ì¤Ì¤Ì[2]     sjjh96
05/23 4306
1 [2][3][4][5][6][7][8][9][10]..[161]

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