delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/11/03/05:15:31

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Please help, Problem using vector,
Date: 3 Nov 2003 10:04:09 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 19
Message-ID: <bo596p$hcp$1@nets3.rz.RWTH-Aachen.DE>
References: <E1AFhRk-0000uP-TR AT t8 DOT cwihosting DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1067853849 17817 137.226.32.75 (3 Nov 2003 10:04:09 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 3 Nov 2003 10:04:09 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

leila <gcceducate AT tutorialwizard DOT net> wrote:

> #include <iostream>
> #include <vector>
> 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 <vector>, and replace
it by a usable C++ textbook.  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.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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