Date: Thu, 14 Jan 1999 16:23:14 -0800 (PST) From: "Ismael Herrera Zamarron(MCC)" X-Sender: ihz AT uxmcc2 To: DJ Delorie cc: djgpp AT delorie DOT com Subject: Re: size_t In-Reply-To: <199901142116.QAA04862@envy.delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Does this type belongs to posix standard or ansi standard? __________________________________________________________________________ || || ||**********************************************************************|| ||______________________________________________________________________|| || || || || ||Ismael Herrera Z. || ||Maestria en Ciencias de la Computacion (MCC) IIMAS UNAM Mexico || ||ihz AT uxmcc2 DOT iimas DOT unam DOT mx || ||http://uxmcc1.iimas.unam.mx/~ihz || || || ||tel. 6 22 36 52 || || || || || || || || || ||______________________________________________________________________|| || || ||**********************************************************************|| ||______________________________________________________________________|| On Thu, 14 Jan 1999, DJ Delorie wrote: > > > could someone please explain to me how size_t works please? > > size_t is a variable whose range of values covers all possible sizes > of other variables. Example: > > size_t a; > char b[100]; > a = sizeof(b); /* a is now 100 */ > printf("a = %d\n", a); /* prints "a = 100" */ > > > ie. when you decalre a variable to be of type int at compile time it sets > > aside 2 bytes for the integer to be stored. > > 4 bytes. > > > What happens when you declare a variable or function to be of type > > size_t ?? > > You get a variable that can hold the value of the size of any object. >