Created
October 11, 2017 04:52
-
-
Save HauptJ/d527a6cc22efb88a413cf4e669c9869a to your computer and use it in GitHub Desktop.
Windows C++ Rick Roll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Opens 15 Rick Roll tabs in the foreground in the users default browser. First experiment with C++ in windows. | |
#include <windows.h> | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int resp; | |
cout <<"You want to play the game?[yes = 1, no = 0]" << endl; | |
cin >> resp; | |
if(resp = 1) | |
{ | |
cout <<"Glad you said yes" << endl; | |
} | |
else if(resp = 0) | |
{ | |
cout <<"Y u so no?" << endl; | |
} | |
else | |
{ | |
cout <<"Y u no answer correctly?!?1" << endl; | |
} | |
for(int i=0; i<15; i++) | |
{ | |
ShellExecute(NULL, "open", "https://www.youtube.com/watch?v=oHg5SJYRHA0", NULL, NULL, SW_SHOWNORMAL); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment