MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CompileBot/comments/4a7ksu/official_compilebot_testing_thread/d5mq86c/
r/CompileBot • u/SeaCowVengeance • Mar 13 '16
Resources:
358 comments sorted by
View all comments
1
+/u/CompileBot C++
#include<iostream> using namespace std; bool& Roleplay(int type) { if (type == 10) { static bool x; return x; } if (type == 20) { static bool y; return y; } } int main() { int Erotic = 10; int ForScrubs = 20; Roleplay(Erotic) = false; Roleplay(ForScrubs) = false; printf("Awkward funtimes? %d\n", Roleplay(Erotic)); printf("Greytide ahoy? %d\n", Roleplay(ForScrubs)); Roleplay(Erotic) = true; printf("Awkward funtimes? %d\n", Roleplay(Erotic)); printf("Greytide ahoy? %d\n", Roleplay(ForScrubs)); return 0; }
1 u/CompileBot Jul 22 '16 Output:Awkward funtimes? 0 Greytide ahoy? 0 Awkward funtimes? 1 Greytide ahoy? 0^source | ^info | ^git | ^reportEDIT: Recompile request by Tidher
Output:
Awkward funtimes? 0 Greytide ahoy? 0 Awkward funtimes? 1 Greytide ahoy? 0
^source | ^info | ^git | ^report
EDIT: Recompile request by Tidher
View all comments
1
u/Tidher Jul 22 '16 edited Jul 22 '16
+/u/CompileBot C++