Here's a simple question from a newbie:
Can I redirect the output of printf into an int buffer? Eg.
Gives a number whereasCode:
printf ("%d", (inmax_t)statbuf.st_size);
Does nothing, meaning I can't do further arithmetic with (intmax_t)statbuf.st_size UNLESS I can collect the output of printf into "int mycount" somehow.Code:
int mycount = (intmax_t)statbuf.st_size;