Hello World Microsoft visual c++2010 Express

#include "std_lib_facilities.h"
int main()
{
cout<<"Hello,World!!!\n";
return 0;
}

_______________________________________________________________
Above is the code I copied from the text book. But why there are two red lines under #include and cout????


And it has compiler error :

1>------ Build started: Project: 2, Configuration: Debug Win32 ------
1> Hello 2.cpp
1>Hello 2.cpp(1): fatal error C1083: Cannot open include file: 'std_lib_facilities.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Can anyone explain to me, what it means by No such file or directory


Thank you very much for your help!!!
I really don't know why I followed the textbook step by step, but my first programming still cannot work.
Last edited on
It means the header file "std_lib_facilities.h" cannot be found in the include folders set up in Visual C++ 2010 express.

The wiggly red line under cout means it is not defined anywhere. #include <iostream> to define it. Also note that cout is really std::cout. Either write 'std::cout' (no quotations) or add the line 'using namespace std;' below the #include lines (again, no quotations).
WOW, I found where my problem is, thank you very much for your help!!!

http://www.stroustrup.com/
Topic archived. No new replies allowed.