Timeline for C++ Enigma Machine
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 30, 2018 at 23:39 | comment | added | JDługosz | @TobySpeight you’re still assuming that the source code character set matches the runtime charset. And the machine's locale is set at run time, and the file you feed it can have some different encoding in any case. | |
Apr 30, 2018 at 16:04 | comment | added | Toby Speight |
Be careful assuming that 'a' ...'z' are contiguous - although that's the case in ASCII and Unicode, it's not true of EBCDIC for example, and a strchr() would be a more portable version there.
|
|
Apr 29, 2018 at 19:05 | history | edited | JDługosz | CC BY-SA 3.0 |
added 282 characters in body
|
Apr 29, 2018 at 0:07 | comment | added | dgnuff | That's fair. Can you do a quick edit to your post so I can change my vote? That said, while I agree that there is benefit in not "ripping it apart", there is something to be said for encouraging good habits right from the start. That's about what I'm trying to do in my answer: show what objects should be classes, and most important of all, why they should be. It's the "Algorithms and Data Structures" concept outlined in Wirth's book. A good rule to remember: a class makes the most sense when you have both. | |
Apr 28, 2018 at 19:36 | comment | added | JDługosz |
I was trying to be positive toward the OP, rather than just ripping everything he did. I agree it’s better if those were instances not functions, but it is a place where he did use indirection rather than a maze of if statements to produce the ordering. I guess no good deed goes unpunished.
|
|
Apr 27, 2018 at 21:29 | history | answered | JDługosz | CC BY-SA 3.0 |