Subject: Re: vector
From: "Gerrit P. Haase" <[email-masked]>
To: [email-masked]
Date: Thu, 22 Aug 2002 13:19:29 +0200

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/