5

Possible Duplicate:
What does the caret (‘^’) mean in C++/CLI?
In C++/CLR, what does a hat character ^ do?

What does the ^ character mean in C++ when applied to the data type in a variable declaration, as in:

String^ input;

or

List<String^>^ phoneNumbers;
Community
  • 1
  • 1
Scott Mayfield
  • 2,254
  • 2
  • 20
  • 28

2 Answers2

7

Assuming a Microsoft-compiler, this is not from C++ but from Microsoft own C++ dialects called C++/CLI. It denotes a .NET-garbage collected object.

Sebastian Mach
  • 38,570
  • 8
  • 95
  • 130
5

It's a managed pointer. Similar to *, but collected by the GC.

Oh yeah, and it only works in C++/CLI, obviously (your post was already tagged cli, but I feel the need to explicitly state this).

Andrei Tita
  • 1,226
  • 10
  • 13