From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c6ca9cbe17b867c4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!Spring.edu.tw!news.nctu.edu.tw!feeder.seed.net.tw!attdv1!attdv2!ip.att.net!newsfeed1.global.lmco.com!svlnews.lmms.lmco.com!not-for-mail From: "Xenos" Newsgroups: comp.lang.ada Subject: Re: access & address Date: Fri, 15 Oct 2004 13:30:03 -0400 Organization: Hades Message-ID: References: <1c2f5137.0410140105.66fdb23e@posting.google.com> <1347924.5V7QhTSfdI@linux1.krischik.com> <2t7jm8F1sp752U1@uni-berlin.de> <1982479.VT7X1MC7VE@linux1.krischik.com> <1137756.92Qd5cOqoD@linux1.krischik.com> NNTP-Posting-Host: 158.187.64.144 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Xref: g2news1.google.com comp.lang.ada:5288 Date: 2004-10-15T13:30:03-04:00 List-Id: "Martin Krischik" wrote in message news:1137756.92Qd5cOqoD@linux1.krischik.com... > Born out of experience. Prehaps I have just seen to much code where the > result of sizeof or std::string::lenght was stored in an int or long or > whatever else is just available. The returnvalue for both is size_t. > Actually no, the type of std::string::length() is std::string::size_type which may or may not be std::size_t. Although, there is nothing necessarily wrong with putting the value in int or long. It comes down to knowing your data. int is guaranteed to hold a value of at least 65535.