Timeline for Count up forever
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 31, 2023 at 17:28 | comment | added | c-- |
using printf(3) won't work here as the %u conversion specifier casts the argument to unsigned int so it will loop after 2^32 (for 32-bit int). You should instead use std::cout as boost overloads operator<< for uint512_t . Suggest using int512_t since it's one byte shorter and can also get to 2^128, also you can use space or comma as separator to save another byte
|
|
Jul 3, 2019 at 20:35 | comment | added | moltarze |
How about the deprecated #import ?
|
|
Nov 22, 2015 at 20:52 | comment | added | Zereges |
I do not knoww boost (and I would not say it is standard either) but isn't i defaultly constructed with the value of 0? You could then strip off definition and switch postincrement to preincremet which would save 2b
|
|
Nov 15, 2015 at 4:17 | history | edited | felixphew | CC BY-SA 3.0 |
Replace iostream with printf
|
Nov 15, 2015 at 3:50 | comment | added | felixphew | @Kenney Thank you for that! (It only saves 5 bytes, not 8.) I think I may have come up with a way to tweak that section even shorter, though. | |
Nov 15, 2015 at 3:47 | history | edited | felixphew | CC BY-SA 3.0 |
Replaced std::endl with "\n" to save 5 bytes
|
Nov 15, 2015 at 2:23 | comment | added | Kenney |
Maybe you could use '\n' instead of std::endl , would save you 8 bytes. Also there may be a way to use CPP #define to compress some repetition,
|
|
Nov 15, 2015 at 2:06 | review | First posts | |||
Nov 15, 2015 at 2:52 | |||||
Nov 15, 2015 at 2:01 | history | answered | felixphew | CC BY-SA 3.0 |