How to convert a string to Unsigned char in c++...
I have,
unsigned char m_Test[8];
I want to assign a string \"Hello world\"
\"Hello world\"
You can use c_str() function of std::string to get the char* out of string. This method basically returns a pointer to c-style string. After this you can use the normal string copying functions such as strcpy or strncpy to copy the value in to test.
c_str()
std::string
char*
strcpy
strncpy
test