TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Grant Beattie
from: David Nugent
date: 1994-11-29 17:56:44
subject: borland C++ for OS/2

> to allow your program to accept parameters and use them, you
 > need to put something else in the brackets, other than
 > void...

 >      int main (char hello[80])

 > allows your program to accept up to 80 characters for its
 > first parameter, AND return an errorlevel...

 > Any probs, give us a yell...


"Any probs", I'd suggest asking someone else other than Grant.

Sigh.

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

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

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

The declaration you mention is not only illegal, but it does not work as
you say it does.

I would seriously suggest that you learn the language, Grant, before
offering others "advice", especially if you've never tried things
yourself. Bad information is a waste of time and bandwidth.

--- Squish/386 v1.11

* Origin: Decadence BBS: It's a way of life ! (3:632/103)
SEEN-BY: 50/99 54/54 620/243 623/630 624/50 632/103 301 348 386 998 633/371
SEEN-BY: 633/379 634/384 635/301 502 503 541 544 636/100 639/100 711/401 409
SEEN-BY: 711/410 430 510 807 808 809 932 934 942 712/623 713/888 714/906
SEEN-BY: 800/1
@PATH: 632/103 348 635/503 50/99 54/54 711/808 809 934

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™.