End Google Ads 201810 - BS.net 01 --> Hy everyone ! I need to do some conversion , from 'CString' to 'const unsigned char *' into function parameter ... can you help me ?
My definition of function is :
std::string CSmtp::base64_encode(const unsigned char *bytes_to_encode, unsigned int in_len)
{
...
...
}

and I want pass an CString parameter :
std::string encoded_login = base64_encode(m_sLogin,m_sLogin.GetLength());
but it won't compile , and the error is :
error C2664: 'base64_encode' : cannot convert parameter 1 from 'class CString' to 'const unsigned char *'I try in many ( dummy ) ways , but in vain ...