Mail Archives: djgpp/1998/07/30/07:40:09
Reply-To: | <arfa AT clara DOT net>
|
From: | "Arthur" <arfa AT clara DOT net>
|
To: | "DJGPP Mailing List" <djgpp AT delorie DOT com>
|
Subject: | RE: please help {newbie}
|
Date: | Thu, 30 Jul 1998 12:40:08 +0100
|
Message-ID: | <000001bdbbae$ce26e100$044d08c3@arthur>
|
MIME-Version: | 1.0
|
Importance: | Normal
|
In-Reply-To: | <6pmncl$pph$1@osprey.global.co.za>
|
> how do i read a file name to the program in the calling statement i.e.
> "c:\resolve test.txt"
For your main statement, if you use
int main(int argc, char *argv[])
then argc is the number of parameters passed, and argv is an array of pointers to
each parameter. In your case, argv[0] would point to a string containing 'test.txt'.
I've never used it before, but I think what I've said is right.
James Arthur
jaa AT arfa DOT clara DOT net
ICQ#15054819
- Raw text -