Re: data types
- From: "Malcolm McLean" <regniztar@xxxxxxxxxxxxxx>
- Date: Sat, 3 Mar 2007 00:06:22 -0000
<koolj96825@xxxxxxxxx> wrote in message
I've been working on this project for the past few months in my spareWhat do you wnat a 16 bit unsigned integer for?
time, and now I started working on the windows interface and going
over my petzold book, I've come to the realization that an int could
be 32-bit for PCs. Oh, I could kick myself for not checking good in
the beginning, but the manual for the compiler I am using says int is
16-bit. It may be out of date.
Anyway, now that I need to go back over and look closely at my code,
my question is: is there a way to declare a variable say a 16 bit
unsigned integer in C? Or is declaring it "short" the only specifier
that may work?
Normally you want something to hold an integer that is big enough to never overflow. For instance an image is probably never going to be more than about 10,000 pixels in either dimension. However whether you have 16 or 32 bits to hold the widtha nd height should be a matter of indifference to you.
Occasionally you do need to interface C to other languages, and these things become important. However not as a rule.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
.
- References:
- data types
- From: koolj96825
- data types
- Prev by Date: Re: Atomic line-reading without buffering
- Next by Date: Re: Please Need someone's help
- Previous by thread: Re: data types
- Next by thread: Re: data types
- Index(es):
Relevant Pages
|