From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1260 invoked by alias); 30 Aug 2004 10:52:04 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 1247 invoked from network); 30 Aug 2004 10:52:01 -0000 Received: from unknown (HELO applibk.profile.co.at) (193.83.21.2) by sourceware.org with SMTP; 30 Aug 2004 10:52:01 -0000 Received: from jupiter.profile.co.at (jupiter.profile.co.at [193.83.20.5]) by applibk.profile.co.at (8.12.8/8.12.8) with ESMTP id i7UAq0xq029742; Mon, 30 Aug 2004 12:52:00 +0200 Received: from [193.83.20.37] (dione.profile.co.at [193.83.20.37]) (authenticated bits=0) by jupiter.profile.co.at (8.12.10/8.12.10) with ESMTP id i7UApxBk003729; Mon, 30 Aug 2004 12:52:00 +0200 Subject: Re: Which header should I include for "reverse" From: Arno Wilhelm Reply-To: arno.wilhelm@profile.co.at To: learning c++ Cc: gcc-help@gcc.gnu.org In-Reply-To: References: Content-Type: text/plain Organization: proFILE Computersysteme GmbH Message-Id: <1093863119.2698.4.camel@dione.profile.co.at> Mime-Version: 1.0 Date: Mon, 30 Aug 2004 12:08:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00272.txt.bz2 Have not tried it out but maybe "using namespace std;" or "std::reverse" would help ? regards, Arno On Mon, 2004-08-30 at 11:43, learning c++ wrote: > Hi, Everyone: > > I compiled a short program to use "reverse" like this: > > #include > #include > > int main() { > > double A[6] = { 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 }; > reverse(A, A + 6); > for (int i = 0; i < 6; ++i) > std::cout << "A[" << i << "] = " << A[i]; > return 0; > } > > But the error is: > reverse.cpp: In function `int main()': > reverse.cpp:7: error: `reverse' undeclared (first use this function) > reverse.cpp:7: error: (Each undeclared identifier is reported only once for > each function it appears in.) > > Thanks in advance! > _________________________________________________________________ > Add photos to your messages with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail -- Arno Wilhelm proFILE Computersysteme GmbH