문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top