Challenge Question


#1

I am pretty sure I am missing something silly here. I was doing the challenge for the chapter and am running into an error.

One this line of code Xcode says "Variable has incomplete type ‘struct tm’. I’ve tried some of the posted solutions with the same results. What am I doing wrong?


#2

Are you importing time.h?

(Edit: probably should have asked whether you’re “#including” time.h, don’t recall off-hand which is appropriate here.)


#3

Well gosh. I knew I was asking a silly question. It was only fitting that the answer was simple as well. Total newbie mistake. I only get away with it because I am indeed a newbie. Thanks for the V8 head slap.


#4

Edit: I had the same problem and just now realized that <time.h> is indeed referred to in the last sentence on page 67.