C++ convert integer to string at compile time
First of all, if usually you know the number at run time, you can as easily build the same string. That is, if you have 12 in your program, you can have also “12”. Preprocessor macros can add also quotes to arguments, so you can write: #define STRINGIFICATOR(X) #X This, whenever you write STRINGIFICATOR(2), it … Read more