From -7222966823478373586
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,8d9af67f0c48e4ef
X-Google-Attributes: gidf78e5,public
X-Google-Thread: fc772,8d9af67f0c48e4ef
X-Google-Attributes: gidfc772,public
X-Google-ArrivalTime: 2002-05-02 15:12:08 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!denver-snf1.gtei.net!news.gtei.net!namche.sun.com!news2me.EBay.Sun.COM!engnews1.eng.sun.com!taumet!clamage
From: rhairgroveNoSpam@Pleasebigfoot.com (Bob Hairgrove)
Newsgroups: comp.std.c++,comp.lang.c++.moderated
Subject: Re: Unsignedness of size_t
Date: 2 May 2002 22:01:50 GMT
Organization: KPNQwest customer news service
Lines: 44
Approved: stephen.clamage@sun.com (comp.std.c++)
Message-ID: <3cd0f54a.860136@news.ch.kpnqwest.net>
References: <3CC7DB8F.52E75D62@bawi.org>
 <3ccd96e9.5974430@news.ch.kpnqwest.net>
 <3cceea67.4384033@news.earthlink.net>
NNTP-Posting-Host: taumet.eng.sun.com
X-NNTP-Posting-Host: netlab.cs.rpi.edu
X-Original-Date: Thu, 02 May 2002 08:15:25 GMT
X-Submission-Address: c++-submit@netlab.cs.rpi.edu
X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated
	iQBVAwUAPNG2HUHMCo9UcraBAQFyuQIAtxvGaaQpnQ4ibzE5/CElxCUAZdsmYKZG
	csTd3QK9s0atPt6X2kTU0/fpCoeeS3EK1m72DPFdkI7yEchFgW+9Og==
	=sOVW
X-Approved-For-Group: jep@[151.161.11.6] comp.lang.c++.moderated
X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang)
Content-Length: 1161
X-Status: $$$T
X-UID: 0000000001
Originator: clamage@taumet
Xref: archiver1.google.com comp.std.c++:11001 comp.lang.c++.moderated:42545


On 1 May 2002 21:57:05 GMT, jpotter@falcon.lhup.edu (John Potter)
wrote:

>
>On 29 Apr 2002 22:41:31 GMT, rhairgroveNoSpam@Pleasebigfoot.com (Bob
>Hairgrove) wrote:
>
>> As to arithmetic, can you give an example where it would be wise (or
>> even necessary) to mix signed and unsigned values?
>
>Neither wise nor necessary, but common.
>   vector<C> v;
>   ...
>   for (int x = 0; x != v.size(); ++ x)
>
>I'm sure that you always write
>   for (vector<C>::size_type u = 0; u != v.size(); ++ u)
>and
>   v.begin() + x
>but never
>   v.begin() + u
>

No, actually I would do this instead:

   vector<C> v;
   for (vector<C>::iterator it = v.begin(); it != v.end(); ++it)


Bob Hairgrove
rhairgroveNoSpam@Pleasebigfoot.com



      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]




