When declaring a function in C++/CLI, what is the meaning of the signs ^ and * before and after a variable?
For example:
Let's say we have a class called MyClass.
St开发者_StackOverflowring^ MyClass::GetSomeInfoForExamplePuprs( int InfoNumber )
{
}
or
static String ^GetOtherInfoExample()
{
}
or
String ^GetOtherInfoExample(object *Something)
{
}
I saw it in source code and can't figure it out.
The asterisk (*
) indicates a pointer.
The caret (^
) is not C++. It is C++/CLI, and indicates a managed handle (that is, a "pointer" to an object on the managed heap).
精彩评论