Ask coding questions

← Back to all posts
main args in C
n0tch (5)

Hello!
The 'input' button in the right side of the console is used to recieve the arguments to the main function?

I'm using it and sendding an arbtrary number of arguments but the argc is always getting 1 as value, the filename.

I'm using this code:

int main(int argc, char *argv[]) {
    printf("%d\n", argc);
    printf("%s\n", *argv);

    return 0;
}

I also used the **argv as argument...

I need an extra configuration to get the main function arguments?
Can someone help me?
Thx!