2026-05-05 12:59 UTC
Never before have I though of this.
In C/C++ signature for main is:
int main(int argc, char **argv);
(yeah, there is also env version).
Note that argv is pointer to pointer where neither pointer is const. You can modify the thing!
Tried using clang on Mac, modifying argv[0] or argv[0][0] works.
#programming #Cpp
Replies (0)
No replies.