I'm having a issue translating a array of String^ that I'm receiving from a C# application. Why can I not create an array of String^? I'm fairly new to C++ so any help is appreciated.
public ref class Example
{
public:
String^ Convert(String^ pointNames[], String^ outputPath)
{
std::string convertedPath = msclr::interop::marshal_as< std::string >(outputPath);
std::string result = otherFunction(pointNames, convertedPath);
return msclr::interop::marshal_as< String^ >(result);
}
};
pointsNames[] is underlined as the error, with the message: Array of handles is not allowed.
What would be a better approach to send an array of strings from a C# application to C++?