It looks like you are using Managed C ++, which is the usual C ++ used in the .NET Framework.
in Managed C ++, I believe that the syntax you are looking for is System::String^ . The reason for this is that since managed types are garbage collected by the .NET Framework, you are not allowed to create “regular” links, since the GC must keep track of all the references to a particular variable in order to know when it is safe to free it.
John ledbetter
source share