No iostream???

Mar 11, 2014 at 7:56am
Hi, All!
Please, whan compiler gets yellow minute and at once starts with:


Line 18: error: iostream: No such file or directory

What would be trick s to fix it?
(p.s. Dont overlookk p.s.: it goes for a compiler where others and me to write many of programs using #include<iostream> every day...every day and, as far as I see, on the same way...

As this is time consuming for us who try to do sth, I would apopreciate any advices!

MANY THANKS!!!


Mar 11, 2014 at 8:00am
May we see more code? It seems odd that your include is on line 18, how many do you have?
Mar 11, 2014 at 12:33pm
Perhaps your
INCLUDE
enviroment variable is not set, or the IDE cannot find the
include
path.
Mar 11, 2014 at 1:21pm
To include you must do it in the start. Example
1
2
3
4
5
6
#include<iostream>  

using namespace std;
{
  cout<<"Hello world"<<endl;
}


If that is not the problem then you must save the .cpp file and then start compiling, otherwise it can't "track" the header file.
Last edited on Mar 11, 2014 at 1:23pm
Mar 11, 2014 at 3:29pm
Mar 11, 2014 at 3:37pm
You compile it as a c file. Change it so that the compiler recognize it as a c++ file (like *.cpp)
Mar 11, 2014 at 3:43pm
Mar 11, 2014 at 7:04pm
You are still compiling it with a c compiler and not c++ compiler. Anyways if you wish to use an online c++ compiler I would suggest http://coliru.stacked-crooked.com/ or http://ideone.com/
Topic archived. No new replies allowed.