【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.3.15.13 string::GetBytes
Contents
Description
Copy the characters of this string into a byte vector
Syntax
BOOL GetBytes( vector<byte> & vb )
Parameters
- vb
- [output] vector of bytes to receive the characters from this string
Return
Returns TRUE if success,otherwise FALSE
Examples
EX1
void string_GetBytes_ex1() { string str = "ABCD"; vector<byte> vResult; str.GetBytes(vResult); //Copy str into vResult for(int ii=0; ii<vResult.GetSize(); ii++) printf("%c", vResult[ii]); //Should print "ABCD" }
Remark
See Also
Header to Include
origin.h