Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it L'avatar di salvod
    Registrato dal
    Feb 2002
    Messaggi
    314

    [C] da char 'lettera' a int suo codice ascii

    come faccio a ricavarmi il codice ascii di un carattere?
    mi serve poichè devo popolare un albero binario ordinato in base ad un campo di tipo stringa

  2. #2
    Utente di HTML.it L'avatar di pdpmpd
    Registrato dal
    Jan 2003
    Messaggi
    448
    con un semplice cast
    Drug misuse is not a disease, it is a decision, like the decision to step out in front of a moving car. [...] In this particular life-style the motto is "be happy now because tomorrow you are dying", but the dying begins almost at once, and the happiness is a memory.

  3. #3
    Utente di HTML.it L'avatar di salvod
    Registrato dal
    Feb 2002
    Messaggi
    314
    stasera ho la testa nel pallone , fammi un esempio.


  4. #4
    codice:
     
    char let[] = { 'A' };
    int ascii = (int) let[0];
    Ricorda che il pc memorizza le lettere come numeri ASCII.
    La stupidità umana e l'universo sono infinite.
    Della seconda non sono certo(Einstein)

    Gnu/Linux User

  5. #5
    Utente di HTML.it L'avatar di salvod
    Registrato dal
    Feb 2002
    Messaggi
    314
    grazie

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.