hcidivision17 (hcidivision17) wrote,

Lies and the lieing linkers that told them

Arcane programming truth #34: .h files are not treated the same as .cpp files.

Assuming that you were taught that the extension choice was convention, you too may have been confused by a 'multiply defined' error on a function declared once, used once, bracketed by #ifndef's, and in a program with only one other #include. I'm lucky I got this one figured out quick enough, lest I start to implement namespaces to make this rather simple program a horendous mess of contexts.

Yes, arcane indeed. The stuff that fixes my programs can only be thought of as rituals in the dark arts...
  • Post a new comment


    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.