c ++/cli caret ^ vs.指针*? [英] c++/cli caret^ Vs. Pointer*?

查看:76
本文介绍了c ++/cli caret ^ vs.指针*?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在C和C#中进行了很长时间的编程,我认为向C ++过渡很容易...
无论如何,我已经看到了插入符号的用法,但我不明白它的含义.

I've programming for a long time in C and in C#, I thought moving to C++ would be smooth...
anyway, I've seen the use of caret but I don't understand the meaning of it.

有什么区别:

std::string *st1;

String::string ^st2;

谢谢!

推荐答案

插入符号特定于指针的托管等效项.

The caret is specific to C++/CLI, Microsoft's .NET version of C++, where it is the managed equivalent of a pointer.

它实际上不是标准C ++的一部分,因此除非您真的打算使用.NET,否则不要使用它.

It is not actually part of standard C++, so unless you truly mean to use .NET, don't use it.

这篇关于c ++/cli caret ^ vs.指针*?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆