Philip Newton (pne) wrote,
Philip Newton
pne

  • Mood:

You know you've been hacking Perl for too long…

…when you're programming C and call a function that takes no parameters and forget the parentheses.

I had code something like mystream << myObject->GetAttribute; and the compiler complained that it didn't know what to do with this and asked me which overridden << operator it should use… of course, the one taking an tAttribute as its second argument!

Then I saw what was wrong and added the parentheses in GetAttribute(). Oopsie.

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments