How to use #ifdef to C/C++

example
int testfunc(int x, int y)
{
#ifdef  _DEBUG
      printf("x=%d, Y=%d", x,y);  // if x=1, y =2 
#endif
   return  (x * Y) ;
}

if debug mode
#define _DEBUG "DEBUG"

print x=1, Y=2
after return


if release mode,
not print
return

C/C++ Data type byte range


data type

data type  byte

unsigned long       DWORD
int                        BOOL;
unsigned char       BYTE;
unsigned short      WORD;
unsigned int          UINT;

char            1 byte -128 ~ 127
unsigned char 1 byte 0 ~ 255

int8                 1 byte -128 ~ 127

int16         2 byte -32,768 to 32,767

unsigned int 2 byte -32,768 to 32,767

(signed) short (int)        2 byte -32,768 to 32,767
unsigned short (int)         2 byte 0 ~ 65,535

int32                        4 byte -2,147,483,648 ~ 2,147,483,647

(signed) int                4 byte -2,147,483,648 ~ 2,147,483,647
unsigned int                4 byte 0 ~ 4,294,967,295

(signed) long (int)        4 byte -2,147,483,648 ~ 2,147,483,647
unsigned long (ing)          4 byte -2,147,483,648 ~ 2,147,483,647
int64                        8 byte -9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807
float                                 4 byte 3.4E +/- 38 (7 digits)
double                        8 byte 1.7E +/- 308 (15 digits)
long double                8 byte 1.2E +/- 4932 (19 digits)


Apartment Buying Guide 2025: Shocking Red Flags You Should NEVER Ignore!

 🏙️ Apartment Buying Guide 2025: Shocking Red Flags You Should NEVER Ignore! 🚨 Are you thinking about buying an apartment in 2025? 🏢  It’...