Hello,

I started coding recently and I don't understand very well the size_t and ssize_t data types. I know that size_t is the same as ssize_t, but the latter is signed.

I've recently seen these lines:


Code:
const ssize_t a = -1;
const size_t b = (size_t) a;


When I use the function printf() with a and b they seem to print the same number, but I don't understand why. To me, they seem to do the same thing as the int data type, but I think I'm missing something. Moreover, how does (size_t) affect the value of a in "size_t b = (size_t) a"?

I don't understand that part either :/