🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #3249

Re: [C++] Direct intitialiseren van elementen in een vector

#3249
From: Luc Kumps
Date: Fri, 23 Jan 2004 07:21
11 lines
1307 bytes
Oelewapperke wrote:
> int a[] = {3,0,9,8,2};
>
> int main() {
>   vector<int> v(a, a+5);

Iets algemener is

  vector<int> v(a, a+sizeof(a)/sizeof(*a));

Luc K
Technical Details
Message-ID: <2Y3Qb.1181$pf4.39976@phobos.telenet-ops.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!solnet.ch!solnet.ch!irazu.switch.ch!switch.ch!ecngs!feeder.ecngs.de!feed1.news.be.easynet.net!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
References: <pan.2004.01.22.10.26.37.526679@ua.ac.be> <1074808734.185439@seven.kulnet.kuleuven.ac.be>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcea4,ded1fa205e24133a
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2004-01-22 23:21:35 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!solnet.ch!solnet.ch!irazu.switch.ch!switch.ch!ecngs!feeder.ecngs.de!feed1.news.be.easynet.net!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
From: "Luc Kumps" <NOkumpsSPAM@pandora.be>
Newsgroups: be.comp.programming
References: <pan.2004.01.22.10.26.37.526679@ua.ac.be> <1074808734.185439@seven.kulnet.kuleuven.ac.be>
Subject: Re: [C++] Direct intitialiseren van elementen in een vector
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <2Y3Qb.1181$pf4.39976@phobos.telenet-ops.be>
Date: Fri, 23 Jan 2004 07:21:34 GMT
NNTP-Posting-Host: 213.118.67.142
X-Complaints-To: abuse@telenet.be
X-Trace: phobos.telenet-ops.be 1074842494 213.118.67.142 (Fri, 23 Jan 2004 08:21:34 MET)
NNTP-Posting-Date: Fri, 23 Jan 2004 08:21:34 MET
Organization: Telenet Internet