How convert constant float value to hex in compile time?
In runtime i do in this way:
int main()
{
union float_to_int
{
float float_;
int int_;
};
printf("43.2 in hex: 0x%X.\n", float_to_int{ 43.2f }.int_);
return 0;
}
How to do this in compile time? I'm completely lost