delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/22/07:37:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 22 Aug 2002 13:19:29 +0200
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <154504628607.20020822131929@familiehaase.de>
To: cygwin AT cygwin DOT com
Subject: Re: vector
In-Reply-To: <200208221015.27126.laurent.pinchart@capflow.com>
References: <3D649A95 DOT 3503A7BF AT photon DOT com>
<200208221015 DOT 27126 DOT laurent DOT pinchart AT capflow DOT com>
MIME-Version: 1.0

Hallo Laurent,

Am Donnerstag, 22. August 2002 um 10:15 schriebst du:

>> I'm baffled why this simple program produces the following errors.
>> Strangly enough, if I remove the push_back call, it compiles without
>> complaint.
> [...]

>> $ gcc test.C
> [...]

> It's a C++ program. You have to use g++. Naming your file test.cpp instead of 
> test.C would be a good idea too.

.C (upper case is an official filename suffix for C++ too!

Using g++ on this example gives errors too:
$ g++ -c vector.C
vector.C:2: `main' must return `int'
vector.C: In function `int main(...)':
vector.C:3: `vector' undeclared (first use this function)
vector.C:3: (Each undeclared identifier is reported only once for each function 
   it appears in.)
vector.C:3: parse error before `>' token
vector.C:4: `array' undeclared (first use this function)


Gerrit
-- 
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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