delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/11/07/18:15:09

From: "A. Sinan Unur" <asu1 AT c-o-r-n-e-l-l DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: problem with rhide under xp
Date: 7 Nov 2002 22:59:21 GMT
Organization: Cornell University
Lines: 59
Sender: asu1 AT cornell DOT invalid (on pool-141-149-209-244.syr.east.verizon.net)
Message-ID: <Xns92BFB6FE96519asu1cornelledu@132.236.56.8>
References: <f1f40a0a DOT 0211071216 DOT fc82989 AT posting DOT google DOT com>
NNTP-Posting-Host: pool-141-149-209-244.syr.east.verizon.net
X-Trace: news01.cit.cornell.edu 1036709961 15188 141.149.209.244 (7 Nov 2002 22:59:21 GMT)
X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu
NNTP-Posting-Date: 7 Nov 2002 22:59:21 GMT
User-Agent: Xnews/5.04.25
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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;
}

-- 
A. Sinan Unur
asu1 AT c-o-r-n-e-l-l DOT edu
Remove dashes for address
Spam bait: mailto:uce AT ftc DOT gov

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019