Article View: alt.comp.lang.learn.c-c++
Article #668Re: Arrays in C++
From: Ron Natalie
Date: Wed, 14 Feb 2001 15:53
Date: Wed, 14 Feb 2001 15:53
24 lines
1640 bytes
1640 bytes
Karl Heinz Buchegger wrote:
>
>
> the C++ way:
> ************
>
> #include <iostream>
> #include <vector>
>
> using namespace std;
>
> typedef vector< int > IntArray;
>
> void Foo1( IntArray& Array )
> {
> for( int i = 0; i < Array.size(); ++i )
> cout << Array[i] << '\n';
> }
or
for(vector<int>::iterator it = Array.begin(); it != Array.end(); ++it)
cout << *it << '\n';
Technical Details
Message-ID:
<3A8AAA16.F81E803B@spamcop.net>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-hog.berkeley.edu!ucberkeley!news.maxwell.syr.edu!newsfeed.skycache.com!Cidera!mencken.net.nih.gov!not-for-mailReferences:
<Ahxi6.6779$mO6.136359@news6-win.server.ntlworld.com> <3A8AA7F6.445CDB0C@gascad.at>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10b7bb,4b7be81e9b0e1dc7 X-Google-Attributes: gid10b7bb,public X-Google-Thread: 114592,4b7be81e9b0e1dc7 X-Google-Attributes: gid114592,public X-Google-Thread: 109fba,4b7be81e9b0e1dc7 X-Google-Attributes: gid109fba,public X-Google-ArrivalTime: 2001-02-14 07:55:19 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-hog.berkeley.edu!ucberkeley!news.maxwell.syr.edu!newsfeed.skycache.com!Cidera!mencken.net.nih.gov!not-for-mail Message-ID: <3A8AAA16.F81E803B@spamcop.net> From: Ron Natalie <ron@spamcop.net> Organization: Sensor Systems X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c++,ctdl.lang.c++ Subject: Re: Arrays in C++ References: <Ahxi6.6779$mO6.136359@news6-win.server.ntlworld.com> <3A8AA7F6.445CDB0C@gascad.at> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 24 Date: Wed, 14 Feb 2001 10:53:58 -0500 NNTP-Posting-Host: 156.40.240.200 X-Trace: mencken.net.nih.gov 982166109 156.40.240.200 (Wed, 14 Feb 2001 10:55:09 EST) NNTP-Posting-Date: Wed, 14 Feb 2001 10:55:09 EST