Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the ^ do? [duplicate]

Tags:

c++-cli

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

like image 685
AndMim Avatar asked Jul 24 '13 13:07

AndMim


People also ask

What does it mean in duplicate?

Definition of in duplicate 1 : so that there are two copies We were required to fill out the paperwork in duplicate. 2 : with an exact copy Please send the contract in duplicate.

What is duplicate used for?

Duplicate is used to describe things that have been made as an exact copy of other things, usually in order to serve the same purpose.

What does duplicate work mean?

It's called duplicate work – literally redoing work that's already been done – and you can just imagine what it's doing to your productivity.

Does duplicate mean 2?

The verb duplicate is pronounced differently, with a long a sound, and it means to make a copy of or to multiply times two. The Latin root, duplicatus, means "to double."


1 Answers

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

like image 75
Jon Avatar answered Oct 11 '22 17:10

Jon