I don't see a dereference in that code, just an assignment with a static_cast of a C-style cast. I think that could've just been a single reinterpret_cast.
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.
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.
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
33
u/_Ilobilo_ 4d ago
that'll just SIGSEGV or trip an assertion in vector operator[]
22
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 4d ago
You know the purpose of
using namespace std;is so you don't have to putstd::everywhere, right? It's also discouraged because it pulls in std into the global namespace, and that can cause problems.3
u/Small-Dig-8233 3d ago
ok bro so like ur using std namespace and still typing std::vector? 😭
3
u/maelstrom071 3d ago
Now im curious, how does this even work?
1
u/tyrannosaurus_gekko 3d ago
Can anyone explain to a CPP noob like me what this code is supposed to do?