delorie.com/archives/browse.cgi | search |
Xref: | news-dnh.mv.net comp.os.msdos.djgpp:593 |
Path: | news-dnh.mv.net!mv!news.sprintlink.net!howland.reston.ans.net!xlink.net!nntp.gmd.de!news.rwth-aachen.de!hathi!softbrek |
From: | softbrek AT hathi DOT informatik DOT rwth-aachen DOT de (Hans-Bernhard Broeker) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: mysterious error -- Need Help! |
Date: | 26 Jun 1995 09:48:59 GMT |
Organization: | RWTH -Aachen / Rechnerbetrieb Informatik |
Lines: | 22 |
References: | <3sb51j$9bu AT berlin DOT infomatch DOT com> <3sc68k$mip AT odin DOT diku DOT dk> |
Nntp-Posting-Host: | hathi.informatik.rwth-aachen.de |
To: | djgpp AT sun DOT soe DOT clarkson DOT edu |
Dj-Gateway: | from newsgroup comp.os.msdos.djgpp |
terra AT diku DOT dk (Morten Welinder) writes: >haasj AT infomatch DOT com (Jarrod Haas) writes: >> /*pass command line to global variable*/ >> for (c = 0; c <= argc; c++) >> { >> args[c] = argv[c]; >> } >> numargs = argc; >Allocate some memory for args, and you'll be far better off! >Morten And, in addition to that, you should change your for loop to read for (c=0; c < argc; c++) because, like all arrays in C, **argv is zero-based. Hans-Bernhard
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |