开发者

what does the symbol ^% mean in c++ project [duplicate]

This question already has answers her开发者_如何学Pythone: What does the C++/CLI Object^% (caret percent-sign) declaration mean? (5 answers) Closed 7 years ago.

i have a c# project AAA with the project type “class library", in another c++ project, it add the AAA.DLL in the reference, in the source code

void CTest:OnCallback(OperationCallbackInfo^% oci)

OperationCallbackInfo is class defined in AAA.dll

my question is: what does the symbol ^ and % mean in the parameter?


It means what you have isn't really C++ at all, but C++/CLI, Microsoft's proprietary version of the language for .NET.

If memory serves, ^% is the syntax for a "tracking reference". It means (at least pretty much) the same as ref does in C#. From a C++ point of view, it's pretty much the same as defining a parameter as a reference to a pointer.


According to this question, it's a "handle", which is a reference (similar to a pointer) in managed C++.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜