cannot convert from 'cli::array<Type> ^' to 'cli::array<Type> ^[]'
- by user1576628
I'm pretty new to C++/CLI and I am trying to convert a System::String to a System::Char array.
Here's what I have so far:
private: System::Void modeToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
Mode frmMode;
if(frmMode.ShowDialog() == System::Windows::Forms::DialogResult::OK){
array <Char>^ load [] = gcnew array<Char>(txtbxName->Text->ToCharArray());
}
}
txtbxName is a textbox inside a the form. Supposedly, this should work, but I get the compiler error:
error C2440: cannot convert from 'cli::array<Type> ^' to 'cli::array<Type> ^[]'
for the fourth line of the snippet.