»Ë»Ñ Æ÷·³
_ÇнÀÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

C¾ð¾î #ifdef ¿¡ ´ëÇØ Áú¹®µå¸³´Ï´Ù~3

  • Gmarket
  • µî·ÏÀÏ 2012-06-11 18:40
  • Á¶È¸¼ö 291
#include
#include

#ifdef TEST
#define VALUE 10
#else
#define VALUE 3
#endif

void main(void)
{
        int result =100;
        int x[7]={3,4,-7,0,8,4,6};
        char s[] = "Number";

        if(x[1] > sizeof(s))
                result = x[strlen(s)]-1;

        else
                result = VALUE -1;
                result = result -1;

                printf("result = %d =", result*VALUE);
}


¿©±â¼­¿ä.. TEST¶ó´Â °ÍÀÌ Á¤ÀÇ°¡ µÇ¾îÀÖÁö ¾Ê¾Ò±â ¶§¹®¿¡
¹Ø¿¡ VALUE °ªÀÌ ´Ù 3À¸·Î ġȯµÈ°Ç°¡¿ä??
#ifdefÀÌ Àß ¸ô¶ó¼­ Áú¹®µå¸³´Ï´Ù..

°á°ú´Â ´ç¿¬È÷ 3ÀÌ ³ª¿É´Ï´Ù..

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 º¸¶ùºû¹Ù´Ù

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 OTL±ÝÁö¢â

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 Gmarket
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û ¸ñ·Ïº¸±â±Û¾²±â