Timeline for Printing lyrics of 99 Bottles of Beer
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 28, 2014 at 10:42 | comment | added | Nobody moving away from SE | @JerryCoffin: You would be surprised to hear how many beginners struggle with the concept of recursion. | |
Aug 15, 2014 at 15:32 | comment | added | Jamal |
Also, would it be a bit better to set N to 99, or is it done this way in case the user somehow wants to start with a different number of bottles?
|
|
Aug 15, 2014 at 14:31 | comment | added | Jerry Coffin | @Jamal: No, it's not really necessary (and with most current compilers, probably makes no difference). | |
Aug 15, 2014 at 14:23 | comment | added | Jamal |
@200_success: I too am interested to know if inline really is necessary here. All I've heard is that it can be useful with templates, but is otherwise unnecessary.
|
|
Aug 15, 2014 at 13:31 | comment | added | Jerry Coffin |
@user3791372: I can't imagine how this could scare anybody. It's literally the simplest possible program to do the job--it has a cyclomatic complexity of 1 (not a single if statement or other flow control statement in it).
|
|
Aug 15, 2014 at 13:10 | comment | added | user3791372 | OP is a self-confessed beginner - this will scare the heck out of them! | |
Aug 15, 2014 at 8:59 | comment | added | 200_success |
My clang++ compiler ignores inline . It generates runtime recursive function calls. There is just one copy of the generic 99-to-3 verse in the binary code.
|
|
Aug 15, 2014 at 7:56 | comment | added | 200_success | I'd like to see your performance benchmarks… and breathalyzer results. | |
Aug 15, 2014 at 7:54 | comment | added | Amession | Nice logic you used there. Saving this program for future reference. | |
Aug 15, 2014 at 5:49 | history | edited | Jerry Coffin | CC BY-SA 3.0 |
added 86 characters in body
|
Aug 15, 2014 at 5:37 | history | answered | Jerry Coffin | CC BY-SA 3.0 |