Menu Close

Work with Command Arguments

In console application program,

int main (int argc, char *argv[]) … the first argument int argc is the number of parameters, the second arguments char* argv[] is an array of strings each holding one parameter.

At the design time, you may fill the Command Arguments in your project propery page as following figure.

At runtime, if your application program is test.exe, then you will use following command line to run your application program:

test.exe test1, test2, test3.

 

One comment on “Work with Command Arguments

  1. You really make it appear really easy together with your presentation
    however I find this topic to be really something that I feel I might by no means understand.
    It sort of feels too complex and extremely extensive for me.
    I’m having a look ahead on your next post, I’ll attempt
    to get the hang of it!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

18,519 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>