Question

I am using Netbeans 6.9 on Ubuntu 11.04. I am developing a console op.and am building in debug mode.

The main function is declared as

int main(int argc, char **argv)

In order to add the arguments, I right click on the project and select:
properties
run
arguments

and enter my arguments of which there are several. However, when I get to the line

    for (i=1; i<argc; ++i) switch (argv[i][1])

I get

argc==1

That is,it is ignoring my arguments for some reason.

Was it helpful?

Solution

I found a cumbersome solution here and a better solution here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top