Question: I receive this warning during the compilation process.

> 
> "warning: format '%d' expects type 'int', but argument 6 has type 'long int'
> 
> 
> 

Should I change `%d` into `%lu` ?

EDIT:
This is a part of the code.

```
if (item->GetVnum() == DRAGON_HEART_VNUM)
{
    sprintf(buf, "Inc %ds by item{VN:%d SOC%d:%d}", ret, item->GetVnum(), ITEM_SOCKET_CHARGING_AMOUNT_IDX, item->GetSocket(ITEM_SOCKET_CHARGING_AMOUNT_IDX));
}
else
{
    sprintf(buf, "Inc %ds by item{VN:%d VAL%d:%d}", ret, item->GetVnum(), ITEM_VALUE_CHARGING_AMOUNT_IDX, item->GetValue(ITEM_VALUE_CHARGING_AMOUNT_IDX));
}

```

Answer: 
Change the format specifier from `%d` to `%ld`, or change the data type of argument to be `int`. (`%lu` would be for `unsigned long int`.)

Alternatively, you could use `std::cin` for input and `std::cout` for output. You don't have to use printf/scanf-style type codes; the correct overload for the type of operand would be called automatically.
i get the same warning but then i searched on-line and the best solution i got was--Doesn't matter just run the program and it works.Because i tried every single thing i could but i couldn't get rid of that 'Warning' so i kept surfing on net n on some geek site i was told to leave the code untouched and just run it and it worked...