mendes paulo
asked on
c++ char convert to string
HOW TO CONVERT * char to string (linha):
const unsigned char
*menino1 = (const unsigned char *)0;
menino1 = p - 17;
string linha = menino[1]+menino[2]+menino [3]+menino [4]+menino [5];
const unsigned char
*menino1 = (const unsigned char *)0;
menino1 = p - 17;
string linha = menino[1]+menino[2]+menino
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Detailed explanation provided. The answer is good source for learning.
http://www.cplusplus.com/reference/string/string/string/ See the variant (4) if your bytes are ended with zero or (5) passing the length -- this may be more suitable for your case... like
Open in new window