![](/img/trans.png)
[英]Containing type does not implement interface when trying to explicitly define a method
[英]Is it really necessary to explicitly define “undefine” even when the define is commented out?
我在執行此代碼時遇到一些問題:
#if TRACE
dbgLog = new LogInfo( "PlatypusCE" );
#endif
即使上面已經注釋了“ TRACE”,但是在大量的一般性評論之后,這種情況仍在發生:
//#define TRACE
一旦我在下面添加了它:
#undef TRACE
...因此是:
//#define TRACE
#undef TRACE
...盡管它可以按預期工作(“ #if TRACE”代碼未執行)。
是否真的需要取消定義未定義的內容(已注釋掉)? 似乎很奇怪。
默認情況下,在配置文件Debug和Release中,Visual Studio將定義TRACE
常量。 您可以在項目設置中(在“ Build
選項卡中)更改此行為。 DEBUG
常量與此類似,默認情況下在Debug配置文件(而不是Release)中處於活動狀態。
TRACE
是默認為調試版本定義的兩個常量之一:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.