c ++变量声明 [英] c++ variable declaration
本文介绍了c ++变量声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<pre lang="midl">String^ name;<br />
String^ message;<br />
StringComparer^ stringComparer = StringComparer::OrdinalIgnoreCase;</pre><br />
^是什么意思?
谢谢:)
what does the "^" mean ?
thank you :)
推荐答案
基本上可以被垃圾收集器移动的指针
^浮动指针
%浮动引用
Basically a pointer that may be moved by the garbage collector
^ floating pointer
% floating reference
这不是C ++,这是托管C ++。如果你想用纯C ++编写代码,别忘了它。
This is not C++, this is managed C++. If you want to code in pure C++, forget about it.
String ^ name; 只是VC ++ .NET中特别使用的托管字符串,即可以在设置中提供/ clr时使用。它作为一个简单的字符串操作,除了它是一个指向字符串的指针或它被引用的对象。
String^ name; is nothing but managed string specially used in VC++.NET, i.e. can be used when "/clr" s provided in the settings. It is operated as a simple string except the fact that it is a pointer to string or the object that it is being referred to.
这篇关于c ++变量声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文