Is it possible to convert the Uint to character form?
I would like to use char() function to convert Uint to character form.
But it is not supported.
Do I get other ways to convert it?
I will output a ascii number which included in ASCII table.
#include <ttmath/ttmath.h>
#include <iostream>
int main()
{
size_t i;
ttmath::UInt<2> a;
std::string str_result;
a = 123456;
a *= 56789;
std::cout << "result: " << a << std::endl;
a.ToString(str_result);
for(i=0 ; i<str_result.size() ; ++i)
std::cout << str_result[i] << ", ascii: " << int(str_result[i]) << std::endl;
}
Is it possible to change ascii code back to character form?
for example 65 -> a
this is the same
int a = 65;
cout << (char)a;