I have the same question as this one, except I'm writing C.
How can I initialize a literal number to have the type size_t
?
Basically, I have a macro that amounts to this:
#define myprint(S) { printf("hello %zu", S); }
and I would like to use it like this:
myprint(0);
But I'm getting the message:
format '%zu' expects argument of type 'size_t', but argument has type 'int'
I've tried writing 0lu
, but it does not work for all architectures.