Question:

What is wrong with my program? (C++ help)?

by  |  earlier

0 LIKES UnLike

whenever i try to execute my program, it says "unable to open include file iostream.h" and when i replace iostream.h with iostream, it says "unable to open include file iostream.h." i just installed it today, is there someting that i need to install? is there something wrong with my program that may be causing this?

#include <iostream>

using namespace std;

int main ()

{

cout << "Hello World!";

return 0;

}

its my first program since i reinstalled c++. i dont think anythings wrong (since i got it off a website http://www.cplusplus.com/doc/tutorial/program_structure.html )

so what do i do?

 Tags:

   Report

3 ANSWERS


  1. Your 6th line &#039;cout &lt;&lt; &quot;Hello World!&quot;;&#039; is the line you need to follow to name your program. Make sure you save the file as &#039;Hello World!.java&#039; (without the quotes).


  2. The source code you posted is correct, but the iostream header file is missing on your computer. The cause is either a botched installation or an old compiler version.

  3. The code looks alright. I&#039;m not sure which compiler you are using, but if it is Visual C++ then you can follow the instructions in this video.

    http://xoax.net/comp/cpp/console/Lesson1...

    If you need Visual C++, you can get it for free here:

    http://xoax.net/comp/cpp/console/Lesson0...

    If you have any problems, post them to me here and I can walk you through them:

    http://xoax.net/forum/

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions