I'm getting the compiler error: (83) error: improper pointer/integer combination: arg #1.
Here's the code that is doing it:
char boot_time[BUFSIZ];
... Line 83:
strftime(boot_time, sizeof(boot_time), "%b %e %H:%M", localtime(table[0].time));
where table is a struct and time is a time_t member.
I read that "improper pointer/integer combo" means that the function is undefined (since in C, functions return ints when they aren't found), and the normal solution is to include some libraries. strftime() and localtime() are both in time.h, and sizeof() in string.h, both of which I've included (along with stdio.h) I am completely stumped here.
struct tm * localtime ( const time_t * timer );
The correct usage is :
time_t rawtime;
localtime(&rawtime);
In your case : localtime(&(table[0].time))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With