X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Thomas8675309 AT yahoo DOT com (Tom) Newsgroups: comp.os.msdos.djgpp Subject: Re: Please help, Problem using vector, Date: 3 Nov 2003 06:42:49 -0800 Organization: http://groups.google.com Lines: 33 Message-ID: <7b68d58f.0311030642.1c78ca55@posting.google.com> References: NNTP-Posting-Host: 63.72.148.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1067870569 15888 127.0.0.1 (3 Nov 2003 14:42:49 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Mon, 3 Nov 2003 14:42:49 +0000 (UTC) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hans-Bernhard Broeker wrote: > leila wrote: > > > #include > > #include > > using namespace std; > > int main() > > { > > int val[10] = {1,2,2,2,2,4,7,8,9,6}; > > int saveVal; > > vector v1(val, val+10); // **** This is where the error starts > > Throw away whatever book or tutorial made you think this is a correct > usage of the stuff declared in standard header , and replace > it by a usable C++ textbook. The OP's example code wasn't that far off - she just omitted the type specialization when she declared v1. That's a pretty common typo, and I'm not sure it justifies throwing away the book (although I agree that a disturbingly high percentage of C++ books are pretty bad and deserve to be thrown away). > The people over in comp.lang.c++ (where > this question really belongs, since it has no particular relation to > DJGPP) will have a list of usable ones in their FAQ list. Agreed, on both counts. Best regards, Tom