Código:
#include <cstdlib> #include <iostream> #include <windows.h> #include <fstream> #include <string> #include <conio.h> using namespace std; int main() { string i; char x; while(true) { x=getch(); i+= x; Sleep(200); ofstream myfile; myfile.open ("log_das_teclas.txt"); myfile << i; myfile.close(); }; system("PAUSE"); return EXIT_SUCCESS; }
Att didinho... (:
Comment