--- [EMAIL PROTECTED] wrote:

> char get_letter( int number )
> {
>    return number + 64;
> }

This is much more readable..

char get_letter(int number)
{
   return (char)(number-1 + 'A');
}

But neither of these two functions is doing the appropriate error checking..
(what if the number is negative, or really large?)

~Kender

=====
-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$ 
P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O 
M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@ 
b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
------END GEEK CODE BLOCK------

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to