Mail Archives: djgpp/2002/11/08/03:05:30
"A. Sinan Unur" <asu1 AT c-o-r-n-e-l-l DOT edu> wrote in message news:<Xns92BFB6FE96519asu1cornelledu AT 132 DOT 236 DOT 56 DOT 8>...
> i DOT eick AT web DOT de (Ivo Eick) wrote in
> news:f1f40a0a DOT 0211071216 DOT fc82989 AT posting DOT google DOT com:
>
> > Hello people,
> >
> > today I installed rhide vers 1.4.9 as proposed by the zip-picker at
> > djgpp. I could compile and run normal c-programs. But when I try to
> > compile a this simple hello world program in cpp I get the following
> > error messages.
> > #include <iostream.h>
> > int main(void)
> > {
> > cout << "hello c++!\n";
> > int x = 0;
> > cin >> x;
> > return 0;
> > }
> >
> > C:\DJGPP\lang\cxx\3.2\backward\iostream.h(31) in file included from
> > C:\DJGPP\lang\cxx\3.2\backward\iostream.h:31, ..sources/hello.cpp(1)
> > from ..sources/hello.cpp(1)
> >
> > and another warning.
>
> you need to change your code to comply with the C++ standard. it would
> also not hurt to give us the exact warning messages, not snippets:
>
> In file included from c:/djgpp/lang/cxx-v31/backward/iostream.h:31,
> from tzt.cc:1:
> c:/djgpp/lang/cxx-v31/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.
>
> hmmmmm ... that is not so hard to understand, is it?
>
> try the following:
>
> #include <iostream>
>
> using std::cout;
> using std::cin;
>
> int main(void)
> {
> cout << "hello c++!\n";
> int x = 0;
> cin >> x;
> return 0;
> }
Thank you very much it's not too hard to understand and it works!
- Raw text -