This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

command-line arguments not working in DS-5 Ultimate evaluation edition

Hi,

 

I need to provide inputs from command-line to my code.

I am using DS-5 Ultimate Evaluation Edition.

int main(int argc, char *argv[])

{

       printf("%d", argc);

       printf("Arguments are: \n");

       for(i=0; i<argc; i++)

      {

             printf("%s\n", argv[i]);

      }

}

 

I am giving input arguments in the following path

Debug Configurations -> Arguments -> Program Arguments ->  Hello  10  world

Here i am giving 3 input arguments...

Argv[0] = Hello

Argv[1] = 10

Argv[2] = world

But argc & argv variables are not populating with these values.

Can anyone correct me , if i am missing something.

Thanks in Advance,

Divya.