The clock_t * and time(time_t*) in <ctime> clashed?

my code:

time_t gpuendtime = time(NULL);
clock_t *time;

It’s OK.

but if I transpose the two sentences :

clock_t time;
time_t gpuendtime = time(NULL);

the compiler tell me :
clock.cu(124): error: expression must have (pointer-to-) function type
Why?
The clock_t * and time(time_t
) in clashed?

Apparently so. Are you including time.h? (I don’t think time() is declared in ctime.h) If so, just name your variable something other than ‘time’

Oh ,yeah. I got it !

my variable name should’t be the same to the function name.What a shame!

Thank you.