4 ms·
When I did my first few programming courses we were using C and on Windows, and using system("pause"); was our way of keeping cmd from closing. So as a joke ove
by giancarlostoro 9y ago
When I did my first few programming courses we were using C and on Windows, and using system("pause"); was our way of keeping cmd from closing. So as a joke over the years I've made a pause script for Linux in Python, Perl and even bash just so I can make such code valid.
But putting a whole game in place of a standard Linux util sounds like awesome menace, reminds me of the sl command (steam locomotive) which you can install on Debian (and maybe other distros?) for those who may typo ls they'll get a fun surprise :)
- pawadu 9y agowasnt getc() available on windows?
- Const-me 9y agoIt was and still is, the name is _getch() from <conio.h> However, I can see how for a beginner programmer system("pause"); is more intuitive than printf/_getch() combo. Especially if said programmer is already familiar with windows shell and its commands.
- c0nfused 9y agosl also starts for LS too in case you have capslock on.