From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: access & address
Date: Sat, 16 Oct 2004 16:25:47 +0200
Date: 2004-10-16T16:25:47+02:00 [thread overview]
Message-ID: <3025014.yqGbeSrbak@linux1.krischik.com> (raw)
In-Reply-To: ckp1f0$i0k3@cui1.lmms.lmco.com
Xenos wrote:
>
> "Martin Krischik" <krischik@users.sourceforge.net> 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.
I know that.
> Although, there is nothing
> necessarily
> wrong with putting the value in int or long. It comes down to knowing
> your
> data.
Currently I enjoy patching together the libraries of two different vendors.
Both of which have a C interface. That puts a real new twist to "knowing
your data". And only when PC-lint runs I know when the two interfaces won't
fit together.
> int is guaranteed to hold a value of at least 65535.
I thought int must only be signed 16bit - and that goes only to 32767. While
size_t need to be large enough to hold any size. Hence it is unsigned. And
on one of my machines it is actually 64 bit.
With Regards
Martin
--
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com
next prev parent reply other threads:[~2004-10-16 14:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-14 9:05 access & address Hans Van den Eynden
[not found] ` <1347924.5V7QhTSfdI@linux1.krischik.com>
[not found] ` <ckm14i$erb2@cui1.lmms.lmco.com>
2004-10-14 18:09 ` Martin Krischik
2004-10-14 20:13 ` CBFalconer
2004-10-15 8:18 ` Martin Krischik
[not found] ` <2t7jm8F1sp752U1@uni-berlin.de>
2004-10-14 18:17 ` Martin Krischik
2004-10-14 19:52 ` Xenos
2004-10-15 8:53 ` Martin Krischik
2004-10-15 17:30 ` Xenos
2004-10-16 14:25 ` Martin Krischik [this message]
2004-10-16 15:15 ` Rich Herrick
2004-10-15 15:46 ` Björn Persson
2004-10-15 17:09 ` Xenos
2004-10-17 23:38 ` Björn Persson
2004-10-18 7:42 ` Martin Krischik
2004-10-14 19:37 ` Xenos
2004-10-15 8:30 ` Martin Krischik
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox