Something wrong with iostream

Ok so since a few days ago i can't compile anything with iostream header, there is no error in compiler log and i can't find any exe file from the compiled source code, I've tried to search the entire disk but no luck.
Even this one is not compiled
1
2
3
4
#include <iostream>
int main(){
   std::cout<<"Hello world";
}

But I can compile this
1
2
3
4
#include <stdio.h>
int main(){
   printf("Hello world");
}

I'm using g++ for both code

Can anyone tell me what is goin on ?
Last edited on
Can you give an example of how you're compiling both programs?
maybe,your compiler only supports ".h".
you should use "iostream.h" instead of "iostream.".

hope that helps.
Sorry for late answer
How do I compile my program ? g++ "filename.cpp" -o "filename.exe". Its working a few days ago

And about iostream.h no not working



EDIT: after I tried to use older version of the compilers its working i can compile code with iostream header, and thanks for your reply :)

But still I dont understand what happen or what causing this all I did just start learning another programing language, and when I work on my exercise this problem started
Last edited on
Are you using an IDE?
Are you running your program from IDE?
(Yes -- these are relevant questions.)
Topic archived. No new replies allowed.