Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

C++ Hello world program error

Status
Not open for further replies.

moin_moin

Newbie level 3
Joined
Jan 23, 2016
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
36
Hello

I am learning C++on my own by reading the book "Programming principles and practice using C++ by Bjarne Stroustrup"

They have started with a basic Hello world program.

Code:
//This program outputs the message "Hello, World  to the monitor
#include"std_lib_facilities.h"
int main() //C++ programs start by executing the function main
{
cout<<"Hello, World! \n"; //output "Hello,World! "
return 0;
}
I am getting this error
[Error] std_lib_facilities.h: No such file or directory

Please give me your comments about this error
Thanks
 

Perhaps the path of this library is not proerly set on your system variables.

As a quick turn around, you could either: Make a search of the std_lib_facilities.h file in your entire disk and add the folder before the file name, or simply copy this file from where it was found to the project folder.
 

I am getting this error
[Error] std_lib_facilities.h: No such file or directory
I think the way are called the library depends on your Compiler and if you not use same as used in that book maybe they give you errors.

However, the general way to write it is like this:

Code:
#include <cstdlib>
[B]#include <iostream>[/B]
[B]using namespace std;[/B]

int main()
{
cout<<"Hello, world"<<endl;

return 0;
}

NOTE: in C++ usually is used cstdlib instead of stdlib.h but it works however
 
You should add the #include"std_lib_facilities.h" header file . The compiler cant find the #include"std_lib_facilities.h" file .So you manually insert that one .
Look here may be helpful**broken link removed**
 
Ya this is the only reason I found. Thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top