Advertisement
Jambix64

ConvertendoCaracterParaASCIIstatic_cast

Jul 4th, 2016
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1.     #include <iostream>                                                                                                      
  2.     #include <windows.h>                                                                                                                                                                                                                                                    
  3.     using namespace std;
  4.     /* Usando palavra chave static_cast para dividir etc...
  5.     */
  6.     int main(){
  7.      char letra = 'c'; // Aconcelho usar tipo char por conter menos bits
  8.       cout<<static_cast <int> (letra)<<endl; // dentro dos parametro operadores <int> para passar a conversao para ascii;
  9.       system("pause");
  10.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement