What is the caret (^) for in a generic template in C++?

219 views Asked by At

I see this code in c++ template examples:

void Main(array<String^>^ args)

but I don't understand the reason for the ^ terminating the String and closing angle bracket.

Is it to allow multiple types or something? If someone could someone straighten me out, I would appreciate it. Thanks!

1

There are 1 answers

0
vincentp On BEST ANSWER

This code is C++/CLI (C++ .NET). String^ is the equivalent of the String class in C#. It's different from std::string. Furthermore, array is a C++/CLI specific class (it's not a standard STL container).