Check out example codes for "int to hexadecimal in c++". It will help you in understanding the concepts better.

Code Example 1

#include <sstream>
std::stringstream sstream;
sstream << std::hex << my_integer;
std::string result = sstream.str();

Learn ReactJs, React Native from akashmittal.com