Click here to Skip to main content
15,901,283 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
when i compile my code
#include <iostream>

int main(int, char **) {
  std::cout << "Hello World!" << std::endl;

  return 0;

this error "fatal error iostream.h no such file or directory"
[no name] 9-Oct-14 9:16am    
What do you do? You read the documentation for whatever IDE you are using and provide the appropriate path to your files in your project settings.
enhzflep 9-Oct-14 9:24am    
Your error message and supplied code appear to be a mismatch.

Older compilers like TurboC used to require the use of iostream.h, while newer ones require the use of iostream (no extension). The error message you show is the same one I'd get with MinGW if I tried to include iostream.h. But as I mentioned, this appears inconsistent with your code, which includes the extension-less iostream.

Which compiler (and version) are you using?
CPallini 9-Oct-14 9:34am    
My virtual 5.
enhzflep 9-Oct-14 9:36am    
Thank-you. :)
KarstenK 9-Oct-14 13:14pm    
write it as answer to close the question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900