PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.cplus > c language
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
c language

Réponse
 
LinkBack Outils de la discussion
Vieux 05/12/2007, 18h07   #1
jani.basha991@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut c language

what is ment by 0xff and 0xaa. i can't understand these type of codes.
so please any one explain me about these type of codes.
  Réponse avec citation
Vieux 05/12/2007, 18h11   #2
Pete Becker
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: c language

On 2007-12-05 13:07:13 -0500, jani.basha991@gmail.com said:

> what is ment by 0xff and 0xaa. i can't understand these type of codes.
> so please any one explain me about these type of codes.


The prefix 0x (as well as 0X) tells the compiler that the characters
that follow are a hexadecimal constant.

--
Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The
Standard C++ Library Extensions: a Tutorial and Reference
(www.petebecker.com/tr1book)

  Réponse avec citation
Vieux 05/12/2007, 18h28   #3
Victor Bazarov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: c language

jani.basha991@gmail.com wrote:
> what is ment by 0xff and 0xaa. i can't understand these type of codes.
> so please any one explain me about these type of codes.


In C as in C++ (the actual topic of this newsgroup), the syntax 0x
followed by a hexadecimal digit (or digits) denotes a hexadecimal
literal - a number written in the notation base 16. Similarly, if
there is no 'x' after the leading 0, it's an octal literal, and if
the number does not start with 0, it's a decimal literal.

In your case 0xff is 0377 or 255, 0xaa is 0252 or 170.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


  Réponse avec citation
Vieux 05/12/2007, 18h49   #4
David Harmon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: c language

On Wed, 5 Dec 2007 10:07:13 -0800 (PST) in comp.lang.c++,
jani.basha991@gmail.com wrote,
>what is ment by 0xff and 0xaa. i can't understand these type of codes.
>so please any one explain me about these type of codes.


Please read http://en.wikipedia.org/wiki/Hexadecimal

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h11.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09269 seconds with 12 queries