Ask your own question, for FREE!
Computer Science 20 Online
OpenStudy (anonymous):

The sudoku game project uses argv and argc. In windows 8, how do I create different shortcuts that I may simply double click to run the game with different arguments? for example: game -debug loads the sudoku game with a trivial board to help me debug it easier. game -normal and game -cheat correspond to different difficulties. Or maybe I should just have the game load without needing additional parameters and have the player pick whatever he wants.

OpenStudy (anonymous):

windows 7*

OpenStudy (anonymous):

well of course it's better that use would choose modes itself in program

OpenStudy (anonymous):

right. Maybe I'll just leave the -debug option

OpenStudy (shadowfiend):

Yeah, I'd put difficulties in the UI, while leaving -debug as a command-line option. But it's really up to you and who will be using it :)

OpenStudy (rsmith6559):

Can't you edit the command-line call in a shortcut's properties?

OpenStudy (anonymous):

yeah he can

OpenStudy (rsmith6559):

Another really neat trick is that you can test argv[0] to see what the name of the program is and act accordingly. Just create Windows equivalent of a sym link to the actual binary with the alternative name.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!