Archived

This topic is now archived and is closed to further replies.

raulmtzsada

Executing from command line

Recommended Posts

How can i make a program to be able to be executed from a command line forexample: pack p5.txt pack is the name of the program p5.txt is the filei needto compact

Share this post


Link to post
Share on other sites
int main(int argc, char ** argv);

argc is the number of arguments, 1(the executable''s path) if none are specified

argv are the arguments, argv[1] is the one you want in this case. argv[0] contains the executable''s path.

If you are using WinMain... well, I''m tired

Share this post


Link to post
Share on other sites