you could just point to the other array, try it with char* info=(char*)(&uinfo)
1 2 3 4 5 6 7 8
unsignedchar uinfo[4] = { 'a','b','c','d' };
char* info;
info = (char*)(&uinfo); // point to the address of uinfo
info[3] = 0; // make sure the cstring is 0-terminated
std::cout << info << std::endl;
but i don't know what u try to do...
And I'd recommend you: stop doing things like this unless you know exactly what you are doing^^
i'm just converting numbers to unsigned char (byte) array, and trying to write those bytes to file as chars
Keep in mind that in C++, unsignedchar, signedchar, and char are all distinct types. The standard stream libraries work with the char datatype, not the signed or unsigned versions. You should avoid converting between them as much as possible.