开发者

C error expected specifier-qualifier-list before ‘time_t’

I got the error

from error.c:31:
/usr/include/ap/mas.h:254: error: expected specifier-qualifier-list before ‘time_t’
make: *** [error.o] Error 1

Feedback

We at least need to see line 31 of error.c and line 254 of mas.h, with preferably a few lines of context around each. This error may have nothing to do with how time_t is being declared. – John Bode

Then I check in error.c (line开发者_JAVA技巧 no 31) -- #include "mas.h" then I check line no 254 in mas.h.

in mas.h

#include <sys/types.h>
typedef struct _x{
  time_t time;
}x;

Can anybody suggest where I am going wrong?


Have you #included <time.h>?


You need to include time.h before including mas.h.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜