I tried to convert dec to hex. For example convert 255 to hex.
opa = 255.ToString("X");
gives me error: error: invalid suffix "ToString" on floating constant
I spent lots of time to convert, but couldn't find right way.
I tried to convert dec to hex. For example convert 255 to hex.
opa = 255.ToString("X");
gives me error: error: invalid suffix "ToString" on floating constant
I spent lots of time to convert, but couldn't find right way.
You're asking about the wrong language. C does not support the dot operator on integers. To do this in C, you need to print it to a string like so.
char numstr[10];
sprintf(numstr, "%X", 255)