What is the difference?
What is the history?
Which is better?
What is the difference?
What is the history?
Which is better?
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C
Stupid Question
"Service of the poor and destitutes is the service of the God"
Normative Changes to ISO/IEC 9899:1990 in Technical Corrigendum 1
Incompatibilities Between ISO C and ISO C++
Thanks. But I want the answer not the idea about them.
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C
stdio.h is the standard C library header that deals with input and output. In standard C++ stdio.h is available, but there are other methods of input and output using streams in iostream.
conio, conio.h, or conio.c are used for console input output that is specific to a particular compiler and platform. The functions available from them are not standard, and do not work with all compilers or platforms.
If you are doing simple input and output in C++, use the stuff from iostream. If you are doing simple input and output in C, use stdio.h. If you want to do more advanced console input and output, you can use the functions from conio if your compiler supports them and you don't need to port your code to other platforms.
Yes my compiler supports all of them. But if stdio is portable and conio is not, and stdio can do anything that conio does(It seems it doesn't) why should I use conio?
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C
stdio cannot do anything that conio does. For example, if for some reason you need to get the character pressed by the user before they hit enter, then you may be able to use a function from conio, but there is nothing in stdio.h or iostream that can do that.
If you have a task that can be accomplished by using something from stdio.h or iostream, then yes, you should prefer that one since it is more portable. Even if you don't change compilers, if you use conio and you post your code here for a question then only people whose compiler supports it will be able to run and test your code.
Thanks for good informations and spending time on it.
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C