Xref: news-dnh.mv.net comp.os.msdos.djgpp:511 Newsgroups: comp.os.msdos.djgpp Path: news-dnh.mv.net!mv!news.sprintlink.net!simtel!nexus.coast.net!news.kei.com!news.mathworks.com!news.duke.edu!agate!howland.reston.ans.net!Germany.EU.net!EU.net!sun4nl!phcoms4.seri.philips.nl!newssvr!kunst From: kunst AT prl DOT philips DOT nl (Pieter Kunst) Subject: Re: mysterious error -- Need Help! Sender: news AT prl DOT philips DOT nl (USENET News System) Organization: Philips Research Laboratories, Eindhoven, The Netherlands References: <3sb51j$9bu AT berlin DOT infomatch DOT com> Date: Thu, 22 Jun 1995 13:38:42 GMT Lines: 40 To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp In article <3sb51j$9bu AT berlin DOT infomatch DOT com> haasj AT infomatch DOT com (Jarrod Haas) writes: >I have this program that I'm writing under djgpp that refuses to run >properly. It compiles fine with no warnings or errors, but at runtime if use >1 or more command line paramaters, i get: [stuff deleted] >I have no idea what the error means, as I just started to use djgpp a few >hours before writing this. Heres the actual program, I hope someone can help >with this..... > >#include >#include > >void parser(); >void do_interactive(); > >/*Globals*/ >char **args; ^^^^^^^^^^^^^ This is just one pointer (to another pointer), not an array! Better try something like: #define MAX_ARGS 100 char *args[MAX_ARGS]; >int verbose; >int numargs; > [stuff deleted] > > /*pass command line to global variable*/ > for (c = 0; c <= argc; c++) > { > args[c] = argv[c]; > } > numargs = argc; >