gpt4 book ai didi

visual-studio-2008 - Visual C++ 10 小写 __FILE__ 宏

转载 作者:行者123 更新时间:2023-12-04 15:04:15 25 4
gpt4 key购买 nike

__FILE__ Visual C++ 10 中的预处理器宏扩展为源模块的名称,但使用小写,例如

c:\path\to\my\file\somesource.cpp

当文件名实际上是
SomeSource.cpp

是否有可能改变这种行为?

最佳答案

正如 Hans Passant 所建议的,我 asked关于 Microsoft Connect 的问题并得到以下答案:

Thanks for noting this. This behavior has existed for a while, at least back to VS 2008. Changing the default behavior could potentially be a breaking change for other customers, so we would prefer to keep the current behavior. Since FOO.TXT is mostly the same as foo.txt for the file system, hopefully using __FILE__ with any comparison can just involve a case-insensitive compare for your application.

关于visual-studio-2008 - Visual C++ 10 小写 __FILE__ 宏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4387629/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com