You declared theTime as a pointer, so you must use -> to access members instead of .
Anyway, there are other problems:
- Include ctime, not time.h for C++ programs
- Your struct pointer is never initialized, so it points to garbage
- You need to populate the struct; it isn't automatically set to the current time when created