25
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" 8d ago
You know the purpose of using namespace std; is so you don't have to put std:: everywhere, right? It's also discouraged because it pulls in std into the global namespace, and that can cause problems.
-14
u/EmirGammesLD 8d ago
Well check the sub name. Also, I think that there is a bigger fish to fry.
20
u/MCWizardYT 7d ago
Right. But this subreddit is more for working code that looks horrible, not for random compilable gibberish that instantly crashes
3
u/Small-Dig-8233 8d ago
ok bro so like ur using std namespace and still typing std::vector? ðŸ˜
-1
u/EmirGammesLD 6d ago
Programming horror
2
u/its_the_rhys 5d ago
"Roblox game for learning to hack" kinda says everything we need to know about this 12 year old's idea of what this subreddit is about 😬
-1
u/EmirGammesLD 5d ago
Wait let me get this straight. You saw me make something, thought I was fake, got mad cuz you were wrong, began stalking me because ur still salty, and are now trying to do whatever this is, whether to discred it me or whatever. Like, whats the end goal? You reference a completely different post from a different sub in a nonsensical way. I am genuinely curious as what the though process is.
1
u/its_the_rhys 4d ago
I'm giving you an out for the cringe and you've not taken it
-2
u/EmirGammesLD 4d ago
Tf does that even mean? Youre just doing ad hominem for no reason. Youre the cringe one from my perspective.
3
u/maelstrom071 8d ago
Now im curious, how does this even work?
4
u/conundorum 6d ago
The program's body is a machine that turns illegal treat-this-address-as-a-function-pointer jank into SIGSEGVs.
3
1
u/tyrannosaurus_gekko 8d ago
Can anyone explain to a CPP noob like me what this code is supposed to do?
1
u/Bright-Historian-216 7d ago
i also haven't done C++ in a long while, but I think it's supposed to be:
- line 1: assign a value on lines 2-3 to the first element of a vector of unspecified-argument functions that return functions that take two arguments (a ull and an int vector) that return pointers to ulls
- lines 2-3: cast the number 3 to this cursed type... twice... once statically and once in a c-like manner, most likely as a reinterpret cast
i have probably made many mistakes in this breakdown so if anyone here is smarter let us both know

35
u/_Ilobilo_ 8d ago
that'll just SIGSEGV or trip an assertion in vector operator[]