Suppress Compiler warning Function declared never referenced

前端 未结 9 690
你的背包
你的背包 2020-12-30 01:51

So i have some code like this:

void foo (int, int);

void bar ( )
{
    //Do Stuff

   #if (IMPORTANT == 1)
       foo (1, 2);
   #endif

}

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 02:07

    You can also define _CRT_SECURE_NO_DEPRECATE macro in Visual studio project settings.

    Goto project Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions

    Add _CRT_SECURE_NO_DEPRECATE.

    Thats it.!

提交回复
热议问题