I want to convert the NSString* str to char* ch, for using it as parameter in this function:
str is obtained from UITextField's text.
void CUserSession::Login (char *pUsername, char *pPassword)
Please help.
On using
ch = [str UTF8String];
//I am getting this error.
Cannot initialize a parameter of type 'char *' with an rvalue of type 'const char *'
then On Using
ch = (const uint8_t *)[str UTF8String];
//I am getting this error.
Cannot initialize a parameter of type 'char *' with an rvalue of type 'const uint8_t *' (aka 'const unsigned char *')
Replace it
with
or try with: