#include<stdio.h>
int main ()
{
// code
}
return 0 ;
#include<iostream>
int main ()
{
// code
}
Which library is best to use?
What is the best and why? And when I code what is the difference in function between them?
If your implementation have a working copy of iostream. h, it is probably the same as iostream except that everything in iostream is in the std namespace, while iostream. h generally preceded namespaces, and didn't use them.
Answers. iostream. h is deprecated and not a standard header. It was used in older programs before C++ was standardized, Functions like cout were defined inside iostream.
YES WE CAN USE BECAUSE INPUT AND OUTPUT OPERATIONS CAN ALSO BE PERFORMED IN C++ ALSO. BECAUSE C/C++ USES WHAT ARE CALLED STREAMS TO OPERATE WITH PHYSICAL DEVICES SUCH AS KEYWORDS,PRINTERS TERMINALS OR ANY OTHER TYPE OF FILES SUPPORTED BY THE SYSTEM.
Both are header file (they have there own coding specifically we can say they have the code for calling function), and those function in iostream. h is cin and cout(to take values from keyboardand print values on monitor) , while in conio. h(to use clrscr() in order to free the last o/p on the monitor screen).
stdio.h
is the header file in the C standard library. It is used for input/output
iostream
is the input output class in C++
So if you're using C++ just use #include <iostream>
First off, iostream
is part of the C++ standard library, and stdio.h
is part of the C standard library. While stdio.h
will work in C++ it does not provide everything that iostream
includes as iostream
is specifically for C++.
Here is stdio.h
documentation.
Here is iostream
documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With