I'm seeing the following expression:
typedef void* type_t;
So I was doing tests and I put type_t
in sizeof
and it returned me 4 bytes in size more like that?
I'm seeing the following expression:
typedef void* type_t;
So I was doing tests and I put type_t
in sizeof
and it returned me 4 bytes in size more like that?
void *
is a pointer to an arbitrary memory address, not a pointer to "nothing." The fact that you have returned 4
in your implementation means that you have a 32-bit application (where memory addresses are represented in 4 bytes). If you compile the same code in a 64-bit application (or some other value), the result of sizeof
will be different.