Soth
asked on
convert unsigned char[] to const char
just say I have the following variable defined as:
unsigned char label[32];
now in my program i want to call the following:
SetDlgItemText(IDC_STATIC, label);
but this gives the error:
"cannot convert parameter 2 from unsigned char[32] to const char *"
so how can I convert my unsigned char label[32] to a const char *??
unsigned char label[32];
now in my program i want to call the following:
SetDlgItemText(IDC_STATIC,
but this gives the error:
"cannot convert parameter 2 from unsigned char[32] to const char *"
so how can I convert my unsigned char label[32] to a const char *??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
worked like a charm!
thanx
thanx
what is the adtvantage usining static_cast ?
Using the standard C++ casting operator 'static_cast' instead of old C style cast notation:
SetDlgItemText(IDC_STATIC,