Trying to compile HelloWorld.cpp

H

Hayato Iriumi

I guess I'm going through initiation while I try to get into C++. I can't
even compile a Hello World app. Here is the code...

#include <iostream>
using namespace std;

void main()
{
cout << "hello";
}

When I try to compile the file "HelloWorld.cpp", I get the following error.

HelloWorld.cpp(1) : fatal error C1083: Cannot open include file: 'iostream':
No such file or directory


What am I doing wrong?
 
H

Hayato Iriumi

OK, I figured it out.
So all I did was to just follow the error messages. I registered the path
where iostream was in INCLUDE, and then things worked. I have now
HelloWorld.exe on my hard drive. Cool!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top