logoalt Hacker News

nurettinyesterday at 3:46 PM1 replyview on HN

Coming from pascal to C as a highschooler, my biggest wtf moment happened when I forgot a ; after a struct in a header. The compiler kept complaining about the code below the include and for the life of me I couldn't figure it out. Took me another hour to reason that the includes must be concatenating invalid code.


Replies

zahlmanyesterday at 6:25 PM

Ah, that's nostalgic.

I haven't done serious work in C in quite some time. I wonder if modern compilers are better at reporting that sort of thing.