As a C newbie, I have trouble to understand the following:
int main(int argc, char *argv[]) {
char **inputs = argv + 1;
char **inputs is a pointer to char *argv[] which is also a pointer, right? But why I have to add the "+1" at the end? Will this be an extra space for the '\0' character?
argv[0], or the first argument, is the string holding the name of your program.
argv[0] is the program you're currently running
argv[1+] are the arguments passed to the program
Perhaps not the best reference: https://www.gnu.org/software/gawk/manual/html_node/ARGC-and-ARGV.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With