G
Greg
I am using the following code to try and output the current date and
time in a C program.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// global variables
struct tm *currentTime ;
int main (void) {
char *time ;
time_t time_now = time (NULL) ;
currentTime = localtime (&time_now) ;
}
When I compile this I get the following:
time.c: In function `main':
time.c:12: called object is not a function
Anyone know why the time function is not working for me?
Thanks
Greg
time in a C program.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// global variables
struct tm *currentTime ;
int main (void) {
char *time ;
time_t time_now = time (NULL) ;
currentTime = localtime (&time_now) ;
}
When I compile this I get the following:
time.c: In function `main':
time.c:12: called object is not a function
Anyone know why the time function is not working for me?
Thanks
Greg