Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- #include <fstream>
- #include <stdio.h>
- #include <string>
- #include <mmsystem.h>
- #include "resource.h"
- using namespace std;
- int main()
- {
- unsigned char key;
- unsigned char word[4] {'S','A','N','S'};
- int i = 0;
- while (TRUE) {
- Sleep(10);
- for (key=8; key<=190;key++) {
- if (GetAsyncKeyState(key) == -32767) {
- if (key != word[i]) {
- i=-1;
- }
- i++;
- }
- }
- if (i==4) {
- PlaySound(MAKEINTRESOURCE(SANS_THEME), NULL, SND_RESOURCE);
- i=0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement