0
Why #include <iostream> instead of #include<stdio.h>?
2 Respostas
0
#include <iostream> is a compulsion to use as it is a header file without which your program execution will be incomplete. actually iostream stands for input output stream which signifies the use of cin & cout in the program.
0
I understood your question as: why not use the declarations from stdio.h instead of iostream?
iostream is the C++ stream library header, which declares the C++ way of dealing with (text) IO. stdio.h is the header that provides the C-style function declarations.
Trying to write readable, proper C++ code you should use iostream. Nevertheless, the functions from stdio.h are sometimes a bit faster... Therefore, as long as, say, 10% IO performance are not relevant, include iostream, otherwise include stdio.h.