I got the most simple code to display sizeof() of a datatype, say an int.
#include <stdio.h>
int main() {
printf('%i', sizeof(int));
}
No matter what I do, such as put sizeof(int) into an integer, or use 'zu' instead of 'i', it hands me this error:
error: invalid conversion from ‘int’ to ‘const char*’
Is there something wrong with my compiler? I do not get why I cannot print such a simple sizeof..
EDIT: It seems a printf('%s', 'foo'); STILL tells me I am converting int to const char*, how on earth??