Great, it works!
I dont know where they hide it but thats a cool trick to turn 'int' into 'string' with a '0'.
Thank you, Anon. You sure know how to recognize different types of trees from quite a long way away. :)
Printable View
Great, it works!
I dont know where they hide it but thats a cool trick to turn 'int' into 'string' with a '0'.
Thank you, Anon. You sure know how to recognize different types of trees from quite a long way away. :)
It's rather well-known, and it turns digits into char's which you can append to a string.Quote:
I dont know where they hide it but thats a cool trick to turn 'int' into 'string' with a '0'.
You are complicating it too much.
Use the bitwise & operator, it seems to be indispensable in this program.
For example, to check if the number passed in parameters has the bit 0 as 1 or 0:
If the remainder of that operation is 0, than it has it as 0, if it is greater than 0, than 1.Code:<number_passed_in_params> & (int) pow(2, 0)
Make a simple loop and through each iteration, apply that.
Except instead of pow one would use 1 << n for powers of two.