Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

c++, c0ld world record most unique keywords in a row that compiles?

c0ldshadow

LPF Founder / Admin
Staff member
LPF Site Supporter
Joined
Mar 17, 2006
Messages
2,863
Points
113
i think i might have new world record for most unique keywords in a row in a program that compiles in devc++ 4.9.9.2 which uses mingw compiler


Code:
#include<typeinfo> 



int main(){if(static_cast<short>(false)){reinterpret_cast<unsigned*>(sizeof typeid( bool));}else do throw new signed long int const volatile();while (1);{auto union{public:private:protected:};} switch(true){case 0xdeadc0de:{break;}default:goto a;}a:enum{};for(;;){continue;}return char(~0xbadc0de);}
 





c0ldshadow

LPF Founder / Admin
Staff member
LPF Site Supporter
Joined
Mar 17, 2006
Messages
2,863
Points
113
the highlight was finding that 'auto union{};' was valid and compiled rofl
 
Joined
Aug 24, 2010
Messages
1,866
Points
48
You lost me! I am not a programer or should I say a code writer.:beer:
 
Joined
Apr 28, 2009
Messages
2,416
Points
63
OK, I get it now. Didn't see that it was getting as many keywords into something that would compile. LOL
Compilers can be finicky. I'm guessing it wasn't with the g++ compiler.
 
Joined
Jul 4, 2008
Messages
2,036
Points
48
Edit:
at first I thought it was just "most words", now I see it is "most unique words". Wow! Very impressive! :D
 




Top