3 ms·
And do you recommend checking the return value on printf and puts?
by wglb 6y ago
And do you recommend checking the return value on printf and puts?
- Kranar 6y agoWhat for? Say printf returns an error, what would you do in that case?
- MaxBarraclough 6y agoIt's bad to just ignore errors. You could immediately terminate, perhaps after printing an error-message to stderr. Depending on the program, this might be better than continuing on with a broken output stream. In C++ you can have iostream throw on error, avoiding the problem of missing manual checks.