I\'m new to C++, and doing a bit of googling I thought sprintf would do the job, but I get an error upon compiling that I can\'t convert between an unsigned c
sprintf
unsigned c
Not sure, what is your exact requirement [ since you didnot paste a snippet of the code .. as Greg requested ], following example might resolve it :
#include #include using namespace std; int main() { float i=1; unsigned char c; c = static_cast(i); cout << c << endl; getch(); return 0; }