开发者

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).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜