且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

返回函数局部变量作为参考

更新时间:2023-01-23 22:33:57

result 是一个 static 局部变量,因此即使在函数退出后它也会存在。不要将其与非静态局部变量混淆。

No. result is a static local variable, so it will exist even after the function exit. Don't confuse this with non-static local variable.

:: $ c> :CLSIDFromString 告诉编译器从全局命名空间中选择 CLSIDFromString ,如果存在 CLSIDFromString 在其他命名空间中定义,在调用站点可见。

:: in ::CLSIDFromString tells the compiler to choose CLSIDFromString from the global namespace, in case if there are many definition of CLSIDFromString defined in other namespace(s), visible at the call-site.