开发者

can i use DEBUG_NEW on managed code?

can i use:

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[开发者_如何学运维] = __FILE__;
#endif

in managed code?

like c# or managed c++?


That should work in C++/CLI just as well as it does in standard C++, which is to say, it's officially not allowed to redefine keyword such as new, but most compilers will let you do it.

With __FILE__ there is no problem, although you probably want to store it in a managed string, if you want to use it from managed code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜