Help with Conversion from Sting to Char
Im working in Visual Studie.NET in Visual C++, and I want to convert my sting into a chat, i want just the first letter of the sting to be my char:
String *name = "Dennis";
now I want the 'D' from Dennis to be in my
char letter;
variable. Without the error: possible loss of data.
My Code at this stage is:
String *name = "Dennis";
String *firstLetter = name->Substring(0,1);
char letter = System::Convert::ToChar(firstLetter);
but I keep on getting "possible los of data" error.
Please help.
Thank you -
Diederick
|