Access command line arguments without using char **argv in main
c, command-line-arguments
Solution
I do not think you should do it as the C runtime will prepare the arguments and pass it into the main via `int argc, char **argv`, do not attempt to manipulate the behaviour by hacking it up as it would largely be unportable or possibly undefined behaviour!! Stick to the rules and you will have portability...no other way of doing it other than breaking it...
Problem
Is there any way to access the command line arguments, without using the argument to main? I need to access it in another function, and I would prefer not passing it in. I need a solution that only necessarily works on Mac OS and Linux with GCC.