开发者

When declaring a function in C++/CLI, what is the meaning of the signs ^ and * before and after a variable?

开发者 https://www.devze.com 2022-12-28 06:05 出处:网络
For example: Let\'s say we have a class called MyClass. St开发者_StackOverflowring^ MyClass::GetSomeInfoForExamplePuprs( int InfoNumber )

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

精彩评论

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

关注公众号