I new to a C++, I downloaded the Microsoft Visual C++ compiler.
I copy/pasted a simple program.

#include <iostream.h>
#include <stdlib.h>

int main()
{
     cout << "This is my first C++ program." << endl << endl;

      system("PAUSE");
      return EXIT_SUCCESS;
}

The compiler has an error that reads
Cannot open include file: 'iostream.h': No such file or directory

Help please

iostream.h is obsolete (depreciated). use <iostream> (without the *.h extension). Then you have to declare std namespace, which can be done in several ways

#include <iostream>
using namespace std;

or like this:

#include <iostream>
using std::cout;

or like this

#include <iostream>
int main()
{
    std::cout << "Hello World\n";
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.