int c = 'A';
if (c == 65) {
printf("Yes, it was an 'A'\n");
}
Characters and integers are intermixable in C. Just note that you must use
== to compare, since = is an assignment.
/Per W
On Wed, 18 Aug 2004, Alexsandro Meireles wrote:
> Hi, people!
>
> I need to use something like this:
>
> if(ascii = 62)
> {
> printf("esta funcionando");
> }
>
> Is there a function for that???
>
> Thanks!!!
>
> _________________________________________________________________
> MSN Messenger: converse com os seus amigos online.
> http://messenger.msn.com.br
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|