Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 C++/CLI 的 ObjectIDGenerator.GetID(Object^,out bool) 中传递一个布尔值。有与此处描述的类似问题。 http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/2ec8e666-ecac-491e-bfb1-1b9108f7eb92 在网上搜索这个类..这个错误和 Lambda 概念的新手. 所以阅读这个 仍然得到上述错误..我做错了什么?
只需传递一个左值类型bool:
bool
ObjectIDGenerator ^generator; Object ^o; bool isFirst; generator->GetID(o, isFirst);
不涉及 lambda。你的错误的原因是你一定是卡[Out]在你的代码中的某个地方,它看起来像一个 lambda 编译器。但是[Out]在调用函数时从不使用。
[Out]