Re: [Dev-C++] Compiling problems with 4.9.7.0 and GCC 3.2
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <cg...@wo...> - 2003-01-16 10:57:52
|
If you use iostream instead iostream.h you must:
1) Add using namespace std; before main or as its first line
2) Each time you use a function or name from it you have to write std::
just before it, in your example: std::cout
The use of iostream.h is considered deprecated, so if you want use it it
would be more comfortable if you add the compiler option
-Wno-deprecated, so the compiler won't send you a very long warning
about it.
Dany P. Wu wrote:
>Hi everyone,
>
>This problem has probably come up for discussion numerous times before.
>It's certainly puzzled me to no end, being a learner at this whole C++
>business.
>
>I figured, by looking in the include directory, that I should use
>iostream instead of iostream.h
>
>That much seemed obvious but when I typed this typical beginner's code:
>
>==================================
>#include <iostream>
>
>main()
>{
> cout << "Hello world!";
> return(0);
>}
>==================================
>
>
|