cftime function is not declared when compile by g++
Posted on 2004-11-15
struct timeval timeval;
gettimeofday( &timeval, 0 );
cftime( timestamp, (char *)"%h %d %H:%M:%S", &(timeval.tv_sec) );
Then the folloing errors output when i compile by using g++,
>g++ -g test.cc
test.cc: In function `int main()':
test.cc:10: error: `cftime' undeclared (first use this function)
test.cc:10: error: (Each undeclared identifier is reported only once for each fu
nction it appears in.)
This is not a problem if i use gcc and reanme the program from test.cc to test.c.
However, i need to use g++.