You can use itoa() in a loop if you like C functions, or you can use a stringstream in a loop if you like C++ objects. I'd go with the stringstream myself, since you don't have to worry about the size of the string buffer then.
Since you want unsigned char, you won't be able to use the default stringstream. You'll have to declare your own like this:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.