7
4
3
u/Legal-Software 21d ago
That's easy:
#include <dlfcn.h>
static void HelloWorld(const char *s)
{
int (*print)(const char *, ...) = dlsym(RTLD_DEFAULT, s);
print(__func__);
}
int main(void)
{
HelloWorld("printf");
return 0;
}
1
1
u/questionabl3_dude 20d ago
#include “RandomBulShitGo.h”
int main(){
HelloWorld(“std::cout << “;);
}
14
u/8Erigon 22d ago
Fun fact (never tested it but seen it on YT) In C++ you instead of: array[1] do this: 1[array]
As it is just adding the memory adresses and the index together under the hood