🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #193

Re: HOW Convert char ("A") to Ascii (65) ?????

#193
From: Joshua Huckabee
Date: Wed, 25 Nov 1998 00:00
27 lines
1627 bytes
You can always declare a variable and assign its equivalent value...
Example:
...
int number = 'A';
char letter = 65;
printf("The value of number is %d and the value of letter is %c\n", number,
letter);
...
Output:
The value of number is 65 and the value of letter is A

*Notice that the compiler replaces the ASCII values for each variable's
contents.


Wladimir Kopilevich wrote in message ...
>How can I convert a char/AnsiString character ("A") to a int ascii value
>(65) ?
>and 65 to "A" ?????
>
>Please reply to ctnkirk@cityweb.de
>
>Wladimir Kopilevich
>
>
>
>
Technical Details
Message-ID: <wnM62.277$7a.321@news1.atlantic.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <SXl62.903$081.6430@news2.cityweb.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11605a,c6c96de55a1b7d31
X-Google-Attributes: gid11605a,public
X-Google-Thread: f9701,c6c96de55a1b7d31
X-Google-Attributes: gidf9701,public
X-Google-Thread: 114592,c6c96de55a1b7d31
X-Google-Attributes: gid114592,public
X-Google-Thread: 10d4ba,c6c96de55a1b7d31
X-Google-Attributes: gid10d4ba,public
X-Google-Thread: fc8d0,c6c96de55a1b7d31
X-Google-Attributes: gidfc8d0,public
From: "Joshua Huckabee" <VulcanX@hotmail.com>
Subject: Re: HOW Convert char ("A") to Ascii (65) ?????
Date: 1998/11/25
Message-ID: <wnM62.277$7a.321@news1.atlantic.net>
X-Deja-AN: 415419128
References: <SXl62.903$081.6430@news2.cityweb.de>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
X-Trace: news1.atlantic.net 911970908 209.208.20.31 (Wed, 25 Nov 1998 00:15:08 EDT)
NNTP-Posting-Date: Wed, 25 Nov 1998 00:15:08 EDT
Newsgroups: alt.comp.lang.learn.c-c++,alt.winsock.programming,att.lang.c++,borland.public.cppbuilder.activex,borland.public.cppbuilder.commandlinetools