TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: David Nugent
from: Paul Edwards
date: 1994-12-01 23:45:00
subject: main again

DN> The above is absolute rubbish. The ISO standard supports two and only two
 DN> forms of declaring main:

 DN>     int main( void );
 DN>     int main( int, char ** );

Correct.

 DN> The use of those arguments is implementation dependant, but usually the
 DN> first is the number of arguments, the second is the address of an array of
 DN> char* into which words on the command line has been parsed.

It's far more well-defined than that.  You really should spring for
the $70 you know David!  :-)  argc will definitely be the number of
program arguments, and argv will be an array of characters, with
the argv[argc] == NULL, stuff like that.  I would quote from the
standard, but it's in the other room, but if you disagree with what
I say, I'm happy to quote that bit again.  BFN.  Paul.
@EOT:

--- Mksmsg
* Origin: none (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.