Reputation: 861
I am trying to solve a problem. I have a char * SERIAL_HEX = 5F6D1F7F But my code is expecting the SERIAL_HEX in reverse order. Like SERIAL_HEX = 7F1F6D5F
So its reversing the hex digits..How can i achieve this in c++ ? Any pointers will help me! Thanks,
Upvotes: 0
Views: 539
Reputation: 14392
You have (at least) 2 possibilities:
std::reverse()
and convert each byte back to its hex-representationUpvotes: 1