+ 1

pre-processor

what's the difference between #include<iostream> and #include<iostream.h>??

11th Oct 2017, 1:50 PM
Sarah
3 Respuestas
+ 5
Both are basically the same libraries with declarations for input/output streams. and operators, but there is one 'huge' difference. iostream.h is an old version, supplied before 1997 with the Turbo C++ IDE using Borland Compiler. The IDE or the Compiler was not updated since then and thus this header lacks the std namespace support and lots of new features and exception handling in methods. iostream is the new version, aimed to be a more type-safe version. It is in accordance with the latest standards, has general exception handling for runtime errors and is more flexible in use. It also supports newer features from C++11. If you were to make a choice which one to use Ill suggest you go with the new one, as it is better. Forget the old now, as sooner or later you will have to let go of the old headers. Some more info on this can be found here : https://www.sololearn.com/discuss/575559/?ref=app https://www.sololearn.com/discuss/719868/?ref=app https://www.sololearn.com/discuss/464149/?ref=app https://www.sololearn.com/discuss/463330/?ref=app https://www.sololearn.com/discuss/711703/?ref=app
11th Oct 2017, 2:01 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 4
Its the same ,just the representation is different , in turbo c++ , we write it #include<iostream.h> whereas we write it #include<iostream> in the new ide that have been launched .
11th Oct 2017, 2:56 PM
RZK 022
RZK 022 - avatar
+ 3
stdio.h/cstdio - standard C input and output , as printf, scanf , fprintf etc. this API is a C API only and based on stateless functions and structures like FILE which hold the state. generally used in a C projects and should be avoided in C++. iostream - standard C++ input and output, contains objects like cout, cin and cerr. works with C++ streams, which are objects that manages IO. the default IO choice for C++ projects. there is a criticism about some aspects of the C++ IO streams, but C++ IO-Streams are still the default choice for most of the projects. conio.h - stands for "console input/output" , a Windows only header which provides C function for console IO manipulations, like getch, ungetch etc. I fail to see a modern use of this library.
12th Oct 2017, 5:38 PM
Ravish kumar singh
Ravish kumar singh - avatar