Date: Sun, 2 Mar 1997 09:17:00 -0600 (CST) From: Andrew Deren To: rellwood cc: djgpp AT delorie DOT com Subject: Re: char to int In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII You do not have to use any function just use: char ch; int i; ch = 'A'; i = ch; and this will set i to be 65 (ASCII for A). You can assign any character to integer. On 1 Mar 1997, rellwood wrote: > 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 > >