#ifndef in c file?

前端 未结 2 1022
一整个雨季
一整个雨季 2021-01-22 21:49

Is it possible to put #ifndef at the top of a c file? Basically I need to check whether a certain preprocessor constant was declared when running the program and my

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-22 22:21

    The code is fine. The error you're getting when using a Makefile has to do with something else (it's hard to be sure without seeing what comes before the #ifndef and seeing the Makefile).

提交回复
热议问题