Jump to content
  • Advertisement

Archived

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

raulmtzsada

Executing from command line

This topic is 5617 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!