+ 1
No file or directory
When i use #include<iostream.h> Every compiler gets error at include header !!
9 Answers
+ 3
In c++ you should use
#include<iostream>
without ".h"
+ 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.
+ 1
But i used without 'h'
Not working âčïž
+ 1
Then you should use correct search directories for include files
How do you compile your file (command line, IDE,....)?
+ 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";
}
+ 1
Yes i also compiled with sololearn compiler but not working
+ 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.
0
".h" is not used in C++.
Instead,use #include<iostream> only without .h
0
OK Jenice