Skip to content

Commit 862b7c4

Browse files
committed
Moved error message for startup file load
If the filename supplied as command line argument fails to load, error message will appear AFTER program title and commands info.
1 parent c0c6488 commit 862b7c4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# ENDIL: exclude Visual Studio solution directory
2+
c-dokuVS
3+
14
# Object files
25
*.o
36
*.ko

sudoku.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ int main(int argc, char* argv[])
4646
initializeSudokuBoard(&board);
4747
initializeString(&commandInput.string);
4848

49+
puts("========== Sudoku Game ==========");
50+
puts(showAllCommandsPrompt);
51+
putchar('\n');
52+
4953
// if one argument was provided, go ahead and load sudoku board from textfile
5054
if (argc > 1)
5155
{
@@ -54,9 +58,6 @@ int main(int argc, char* argv[])
5458
loadSudokuBoard(argv[1], &board);
5559
}
5660

57-
puts("========== Sudoku Game ==========");
58-
puts(showAllCommandsPrompt);
59-
putchar('\n');
6061
printSudokuBoard(&board);
6162

6263
while (running)

0 commit comments

Comments
 (0)