🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #5808

Re: tamaño en bytes

#5808
From: Julián Albo
Date: Mon, 08 Sep 2003 16:24
22 lines
1681 bytes
Matias Woloski escribió:

> El problema es que tengo que implementar una mini base de datos en c++, en
> donde defino mis tipos de datos que confiarian en los tipos de datos
> nativos.
> Por ejemplo si mi base de datos tiene que soportar enteros de 2 bytes, mi
> clase 'Int16' tendra por debajo un 'short int'. Entonces si el tamaño
> cambiase entre diferentes distribuciones tendria que manejarlo de otra forma

#if sizeof (short int) == 16
typedef short iint Int16;
#else
....
#else
#error Unsupported architecture or compiler
#endif

Salu2
Technical Details
Message-ID: <3F5CAD25.AE9F5BD5@terra.es>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!50.red-213-96-228.pooles.rima-tde.NET!not-for-mail
References: <bji3ts$iv42b$1@ID-148083.news.uni-berlin.de> <20030908143734.4C5FC1EA.NOFFLE@BlackSpark.local> <bjia6i$ivqa8$1@ID-148083.news.uni-berlin.de>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,6bded6c0142ea4bd
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-09-08 09:24:09 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!50.red-213-96-228.pooles.rima-tde.NET!not-for-mail
From: Julián Albo <JULIANALBO@terra.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: tamaño en bytes
Date: Mon, 08 Sep 2003 18:24:05 +0200
Lines: 22
Message-ID: <3F5CAD25.AE9F5BD5@terra.es>
References: <bji3ts$iv42b$1@ID-148083.news.uni-berlin.de> <20030908143734.4C5FC1EA.NOFFLE@BlackSpark.local> <bjia6i$ivqa8$1@ID-148083.news.uni-berlin.de>
NNTP-Posting-Host: 50.red-213-96-228.pooles.rima-tde.net (213.96.228.50)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de 1063038246 20010963 213.96.228.50 (16 [169296])
X-Mailer: Mozilla 4.8 [es] (X11; U; Linux 2.4.20-4GB i686)
X-Accept-Language: en