Page 1 of 1

How to convert an int to a base 2 (binary) wxString?

Posted: Thu Aug 01, 2019 3:15 pm
by tomay3000
Hello,
I could not find any wx function that converts an int to a base 2 (binary) wxString.

TIA.

Re: How to convert an int to a base 2 (binary) wxString?

Posted: Thu Aug 01, 2019 3:36 pm
by doublemax
http://www.cplusplus.com/reference/cstdlib/itoa/

If it's not available on your system, writing your own function is very trivial.

Re: How to convert an int to a base 2 (binary) wxString?

Posted: Thu Aug 01, 2019 10:56 pm
by tomay3000
I found out that I can do it via std::bitset

Thank you for the hint anyway.