Hello World Trouble

Hi I am just trying c++ for the first time. I'm using Bjarne Stroustrups' book Programming: Principles and Practice Using C++. This is what he has in the book for his hello world program.

#include "std_lib_facilities.h"

int main()
{
cout << "Hello, World!\n";
return 0;
}

I am using Orwell Dev-C++ and it will not work however when i tried this

#include <stdio.h>

int main(int argc, char** argv)
{
printf("Hello world!\n");
return 0;
}

It works just fine. Is there something I can do to get the first to work because I'd hate to not be able to use the textbook I bought. Any help would be greatly appreciated.
#include <iostream>
and
std::cout
Last edited on
closed account (z05DSL3A)
Have you read/followed the Drill at then end of chapter 2?
You should report the error you got. Simply looking at the code it is impossible to say what is wrong with your compilation.
Thanks for the help using iostream allowed it to compile. I'll make sure to look ahead in the chapter next time.
I think that the problem is not in the header iostream because header std_lib_facilities.h has already to have included iostream.
you are right vlad but it is not the standard I mean you have to find it,download it and...you know
@Chriscpp

you are right vlad but it is not the standard I mean you have to find it,download it and...you know



It is what the reader has to do. Here you are

http://www.stroustrup.com/Programming/std_lib_facilities.h
so problem solved lol ;)
Topic archived. No new replies allowed.