I have two functions
foo(const string &value)
{
bar(...)
}
bar(const u_char *value, size_t len)
{
// do something
}
How do I convert a const string into a u_char *? I believe I can get size_t by using the sizeof() function.
Help is very appreciated.
Conversion from string to char* is done by using
c_str().Regarding the
u_charconversion, I don’t think it’s any different.This will help you : MSDN string converison