在OSX上编译的ctime和time警告
在OSX 10.6.5上编译C程序时,我收到了一些警告,这似乎非常关键。
extras.c:15: warning: implicit declaration of function ‘time’
extras.c: In function ‘outlog’:
extras.c:363: warning: implicit declaration of function ‘ctime’
相应的行如下:
第13-15行:
RANDNUMGEN = gsl_rng_alloc(gsl_rng_taus);
long t1;
(void) time(&t1);
第360-363行:
if (LOG==NULL) { LOG=stdout;}
TVAL = time(NULL);
char* TIMESTRING = ctime(&TVAL);
我相信这个程序最初是为Linux编写的,所以我想知道两个平台上time
和ctime
之间是否存在差异?
没有找到相关结果
已邀请:
1 个回复
疏腔傻小雹
在顶部的某个地方。 也,
是非常糟糕的代码,
的参数类型为
,所以应该阅读