Re: [AD] Where is the command line? |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
You can use the standard C method of accessing the command line with Allegro programs: Int main(int argc, char **argv) argc receives the number of arguments and argv is an array of C strings with the arguments in it. argv[0] is special and it’s always the program name. Use specified arguments start at index 1, so check if argc is >= 2. From: Allegro-developers [mailto:allegro-developers-bounces@xxxxxxxxxx] On Behalf Of Andrew Robinson I would like to use command line parameters, in either Windows or Linux, so that when I launch one Allegro program, it in turn will open a file specified on the command line. I could mix and match native OS functions, but I prefer something cross-OS, in other words, an Allegro function that supports this in some way. I have searched the Internet and found nothing. Does such a thing even exist? Thanks, Andrew |
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |