On the overall, your code looks ok. Some points you could improve:
- Be more consistent with indentation (you use 2 spaces and 4 spaces inconsistently. I would suggest using 4 spaces everywhere).
- Be more consistent with spacing. Around the
+operator, you sometimes use spaces and sometimes not. I would suggest always using spaces. - You should add error handling when reading data from
stdin(the call tocincan fail). - Try not to use abbreviations when not necessary; it lowers the readability of your code.
sdkis typically used for "software development kit". I would suggest naming your functionreadSudokuinstead ofread_sdk. - Send error messages to
cerr, and normal log messages tocout. For small programs this does not change a lot, but for big programs it is useful to be able to print errors only. - Do not write
ifconditions on a single line; this lowers readability: (if (...) return false). It is easier to read when this is on two lines. - Do not use single letter names for parameters like
sdk v. Now your code is very small so this does not change a lot, butvdoes not have any meaning. Naming it e.g.gridwould be a lot better. - Do not use
and,orandnot. Prefer&&,||and!(the written versions of the operators exist only for backwards compatibility and historical reason, they should not be used in new code, see thisthis).