Can i use string in C++ which support embedded NULL character?
My issue is: Constructing string with embedded NULL and hence sent it to C++ DLL as an array of bytes.
string inputStr("he\0llo", 6);
int byteLength = 6;
BYTE *inputByte = (BYTE*)(char*)inputStr.c_str();
ApplyArabicMapping(inputByte , byteLength);
'\0'character to know that it ends. furthermore, if you use the string.c_str() method, you get an array of characters with the'\0'character at the end.vector<char>instead. Why do you need this?string(which in C++ would bestd::stringunless otherwise said), but rather in the use of a different interface. That is, the question lacks the most important bits of information, that are only sprinkled in comments.