The reason for a caret

In the book "Microsoft Visual C++/CLI Step by Step",

The following class is defined:

1
2
3
4
5
6
7
8
9
10
11
12
ref Class Animal
public:
	int legs;
	void SetName(String ^nm)
	{name = nm;
	}
	String^ GetName()
	{return name;
	}
private:
	String ^name;
};


What is the purpose of using the caret (^) before nm and name, and after String?

If there is a website I can reference, that would be great too.
closed account (z05DSL3A)
It's a Handle, kind of a cross between a pointer and a reference.

see: http://msdn.microsoft.com/en-us/library/yk97tc08.aspx
Topic archived. No new replies allowed.