Why aren't include guards or pragma once working?

前端 未结 3 700
逝去的感伤
逝去的感伤 2021-02-08 09:47

I\'m compiling some code that relies on include guards to prevent multiple definitions of objects and functions, but Visual Studio 2008 is giving me link errors that there are m

3条回答
  •  暖寄归人
    2021-02-08 10:04

    If you're getting linker errors... are you sure you're not 1) actually defining a function twice in code or 2) trying to do something silly like #include a source file (as opposed to a header file)?

提交回复
热议问题