Advertisement
FuncaosCAndCPluplus

getch_and_getche

Aug 16th, 2016
1,342
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <iostream>
  4. #include <string.h>  
  5. #include <conio.h> // getche, getche
  6. using namespace std;
  7.    
  8. int main() {
  9.          
  10. /*
  11.     // Ler o caracter do telcado e nao imprime!
  12.     char a;          
  13.     a = getch();
  14.     cout<<a<<endl;
  15.    
  16. */  
  17.    // Ler o caracter do teclaco e imprime!
  18.     char b;
  19.     b = getche();        
  20.        
  21.     return 0;
  22. }
Advertisement
RAW Paste Data Copied
Advertisement