struct not working with certain names

I'm still learning and going through chapter exercises in this book I've got. The one I'm stuck on has you calculate how many seconds there are in a user input of hours:minutes:seconds.
Well, the code works and it calcs properly but if I name the struct "time" or "clock" it won't allow me to create a variable of that type saying it expects a ; before the variable name.
time and clock aren't built-in c++ keywords so the only thing I can think of is if time and clock are classes that came with the gcc compiler or with the bloodshed ide I'm using. I did take a look at the gcc manual but couldn't see anything.
Is there something I'm just ignorant of that causes time and clock to not work or if I'm right is there a way to find the time/clock classes and take a look at them?

Thanks :)
Here's why http://www.cplusplus.com/reference/clibrary/ctime/

Somewhere you are including this library in your program, stop including it and you should be fine.
Last edited on
Both the function named "time" and the function named "clock" are defined in <time.h>
Cool, that answers that. Thanks again.
Topic archived. No new replies allowed.