+ 1

No file or directory

When i use #include<iostream.h> Every compiler gets error at include header !!

5th Mar 2020, 1:05 PM
Shubham Rankhambe
9 ответов
+ 3
In c++ you should use #include<iostream> without ".h"
5th Mar 2020, 1:18 PM
andriy kan
andriy kan - avatar
+ 3
iostream.h is an outdated header that was used in turboc++ before the standardization of C++. Modern compiler do not support it anymore and iostream without the .h is used instead. Many of the programming practices used in turboc++ do not work anymore after the standardization of c++ so expect more errors to pop up.
5th Mar 2020, 1:22 PM
Dennis
Dennis - avatar
+ 1
But i used without 'h' Not working ☹️
5th Mar 2020, 2:00 PM
Shubham Rankhambe
+ 1
Then you should use correct search directories for include files How do you compile your file (command line, IDE,....)?
5th Mar 2020, 2:06 PM
andriy kan
andriy kan - avatar
+ 1
Can you post the code with which you tried to compile? Try to compile this with the compiler on sololearn, it should compile: #include <iostream> int main(){ std::cout << "Hello world\n"; }
5th Mar 2020, 2:07 PM
Dennis
Dennis - avatar
+ 1
Yes i also compiled with sololearn compiler but not working
5th Mar 2020, 3:12 PM
Shubham Rankhambe
+ 1
Well yea, that's why I'm asking for code "Not working" is not gonna help either one of us to figure out what is wrong. If I look at the code in your code bits then you're missing multiple semicolons and your main is inside off another class, which is incorrect, among other errors. You might want to fix those 2 issues first, then we can try to fix the rest.
5th Mar 2020, 4:18 PM
Dennis
Dennis - avatar
0
".h" is not used in C++. Instead,use #include<iostream> only without .h
6th Mar 2020, 8:22 PM
Janice Angella
0
OK Jenice
7th Mar 2020, 5:24 AM
Shubham Rankhambe