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 strcpy:
strcpy
unsigned char m_Test[8]; strcpy((char*)m_Test, "Hello world");
Note that "Hello world" is too long for 8 bytes, so you will probably get a segfault.