hex is a user on niu.moe. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
hex @hex

Obtaining the Answer to the Ultimate Question of Life, the Universe, and Everything in c++:

<Windows.h>
<iostream>

int main() {
unsigned char f[] = {
0xb8, 0x2a, 0x00, 0x00, 0x00, 0xc3,
};
std::cout << ((int(*)())(void*)f)() << std::endl;
return 0;
}

output: 42 🤔

@hex Is this something like Yet Another Perl Hacker, but for HHGG nerds and without Perl?

@lanodan it just execute machine code directly :bloblewd:

@hex I know how to read C++, even if this one isn’t portable.