What is the use of intptr_t?

The primary reason, you cannot do bitwise operation on a void *, but you can do the same on a intptr_t. On many occassion, where you need to perform bitwise operation on an address, you can use intptr_t. However, for bitwise operations, best approach is to use the unsigned counterpart, uintptr_t. As mentioned in the … Read more

Why is assigning a value to a bit field not giving the same value back?

Bit-fields are incredibly poorly defined by the standard. Given this code struct mystruct {int enabled:1;};, then we don’t know: How much space this occupies – if there are padding bits/bytes and where they are located in memory. Where the bit is located in memory. Not defined and also depends on endianess. Whether an int:n bitfield … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)