Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <stdio.h>
- int main()
- {
- unsigned int counter=0;
- FILE* myfile = fopen("example.txt","wb");
- while(true)
- {
- if(GetAsyncKeyState(VK_CONTROL))
- {
- freopen("example.txt","ab",myfile);
- counter++;
- fprintf(myfile,"Escape : %d",counter);
- printf("Button pressed !\n");
- }
- Sleep(100);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement