If your
CString
should contain the exact binary copy of the character array (however, what is the purpose of such a requirement?) then you have to use
GetBuffer/ReleaseBuffer
methods, for instance:
char p[] = {0x10,0x41, 0x00, 0x45};
CStringA foo;
memcpy(foo.GetBufferSetLength(sizeof(p)), p, sizeof(p));
foo.ReleaseBuffer(sizeof(p));