On Sun, 9 Feb 2003, Sankha Subhra Som wrote:
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
This is not required.
Your program should look like this, ----------------------------------------------------------------- #include <iostream> /* <X> replaces <X.h> */ using namespace std; /* lets use standard cout */
main() { cout << "blahblah\n"; /* \n to get this printed properly */ } -----------------------------------------------------------------
When i try to run the executable the shell does a silent return, without printing the blahblah as it is supposed to.
The "blahblah" is being overwritten by your shell prompt, "\n" at the end will avoid this overwriting.
HTH,
Rajesh