Message-ID: From: "Cristovao Braga" To: "rellwood" Cc: "djgpp list" Subject: Re: char to int Date: Sun, 2 Mar 1997 02:29:20 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit > From: rellwood > > Is there a function I can use to convert a char to an int? The closest > thing I can find is atoi(), which actually converts a string. Is there > anything better? > > -Richard The conversion is handled automatically by the compiler. But if you must... main () { char c; int i; i = (int) c; c = (char) i; }