What does the ^ do? [duplicate]

半城伤御伤魂 提交于 2019-12-10 15:16:20

问题


I'm new to C++ programming and am going through some examples that I found a while back. Since I am a decent Java programmer, I'm making good progress (at least from my perspective :D).

Now I've come across something I cannot figure out what it does:

Threading::Thread ^ th = Threading::Thread::CurrentThread;
Net::IPEndPoint^ hostEp;

What is the purpose of the ^? And is there a difference between the useage in the two lines I've only known this to be the XOR Operator.

Thanks in advance


回答1:


This code is not C++, it is C++/CLI. ^ is an extension that denotes a pointer to a managed object instance.



来源:https://stackoverflow.com/questions/17835795/what-does-the-do

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!