+ 6
You don't get errors when you give %d but get a warning. The size of() function expects a long unsigned int type but when you give %d it's only int type. When you write, %ld it means long int . It works without any error. But the best one is: %lu Because using %lu means long unsigned int which is the type of specifier that sizeof() use. You can have a look at this question: https://stackoverflow.com/questions/21128092/d-expects-argument-of-type-int-but-argument-2-has-type-long-unsigned-int
3rd Jul 2021, 7:35 AM
The future is now thanks to science
The future is now thanks to science - avatar