5

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

John Dibling
  • 99,718
  • 31
  • 186
  • 324
AndMim
  • 550
  • 1
  • 3
  • 11

1 Answers1

13

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

Jon
  • 428,835
  • 81
  • 738
  • 806