X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: re:calling a file as an argument to main Date: 6 Dec 2001 17:18:53 GMT Organization: Aachen University of Technology (RWTH) Lines: 30 Message-ID: <9uo99t$4sq$1@nets3.rz.RWTH-Aachen.DE> References: <2d DOT 154c0b9a DOT 2940fdb4 AT aol DOT com> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1007659133 5018 137.226.32.75 (6 Dec 2001 17:18:53 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 6 Dec 2001 17:18:53 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com C102000 AT aol DOT com wrote: > I am using windows 98 and i am used to using unix, in unix to call a > file as an argument to main, you include the filename when you call > the program from the command line window. I have read the faqs but i > cannot find the equivilent for a windows c program any ideas?. First of all, please note that DJGPP doesn't build "Windows C programs", which means there's quite a chance that you're asking this question in the wrong place. That set aside: the usual method is exactly the same for Windows programs as the one you know from Unix. It just happens behind the scenes, where you usually don't see it. E.g. if you drag'n'drop a file onto an executable program, or just double-click a document file with a registered application for it, the effect usually is exactly that Windows sets up a command line by putting the filename after the program name and executes that. You can actually see that if you look at the registered file types and edit the "open" action defined for such a type. If you want to, you can always type, e.g. notepad myfile.txt in a DOS shell to start Notepad and immediately have it open "myfile.txt" -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.