this is in reply to the g++ compiler problem stated by sanka ..... the problem in the code is that the gcc 3.2 follows the ANSI/ISO C++ standards ..... the new set of standard header files r more object oriented ..... all those headers also now include namespaces ... so ur code should be
#include <iostream> using namespace std; int main() { cout << "blah"; return 0; }
Dinesh.
- Morality ends where the barrel of a gun begins.
Message: 2 Date: Sun, 9 Feb 2003 19:46:54 +0530 (IST) From: harsh z2005008@reg.iitb.ac.in To: linuxers@mm.ilug-bom.org.in Subject: Re: [ILUG-BOM] Problem with g++ Reply-To: linuxers@mm.ilug-bom.org.in
On Sun, 9 Feb 2003, Sankha Subhra Som wrote:
I think this is a particular problem with iit kgp compiler...:)
I have this peculiar problem with g++ under linux. This is a small piece of code that i wrote #include<iostream.h> main() { cout << "blahblah"; }
When i try to compile it, i get the following warning
In file included from
/usr/include/c++/3.2/backward/iostream.h:31,
from first.cpp:1:
/usr/include/c++/3.2/backward/backward_warning.h:32:2:
warning: #warning
This file includes at least one deprecated or antiquated
header. Please
consider using one of the 32 headers found in section 17.4.1.2
of the
C++ standard. Examples include substituting the <X> header for
the <X.h>
header for C++ includes, or <sstream> instead of the
deprecated header
<strstream.h>. To disable this warning use -Wno-deprecated.
To get a warning free compile i commented out the line
#include backward_warning from iostream.h
When i try to run the executable the shell does a silent
return, without
printing the blahblah as it is supposed to. I redirected the output to a file, and it contained
blahblah.
I dont think the problem is with g++, but i cant exactly put
my finger on it.
Any pointers would be gratefully acknowledged Sankha