S
simon
I am a fresh Visual C++ .NET Developer. Can you kindly guide me for
How to Convert char[1024] to System::String
I am using windows forms and trying to set a text value referencing
the method className() of an object of class HetConvert (my own) this
returns a char - which as you can see from the code below I am trying
to pass to label1->Text - but this expects a String^
any clues anyone
Thanks
----------------------
public: System::Void label1_Click(System::Object^ sender,
System::EventArgs^ e) {
HetConvert *hetcnv = new HetConvert ( "Hetcnv" );
char outputString[1024] ;
strcpy(outputString, (hetcnv->className()+ '\0') ) ;
label1->Text= outputString ;
}
How to Convert char[1024] to System::String
I am using windows forms and trying to set a text value referencing
the method className() of an object of class HetConvert (my own) this
returns a char - which as you can see from the code below I am trying
to pass to label1->Text - but this expects a String^
any clues anyone
Thanks
----------------------
public: System::Void label1_Click(System::Object^ sender,
System::EventArgs^ e) {
HetConvert *hetcnv = new HetConvert ( "Hetcnv" );
char outputString[1024] ;
strcpy(outputString, (hetcnv->className()+ '\0') ) ;
label1->Text= outputString ;
}