TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Rafael Solomon
from: David Nugent
date: 1994-11-29 17:48:12
subject: borland C++ for OS/2

> ac>   int main(void)

 > I have only started programming in C so I haven't used that can you
 > tell me the advantages of that compared to "void main()"

"void main()" does not conform with the ISO standard. Put simply,
it still 'works' with most (all?) compilers, but there is no guarantee that
any conforming implementation need do so or will. "void main()"
is often used in books which were written prior 1989 (when ANSI-C became
standard) or written by folks who learned C before 1989.

Using "void main()" is regarded as poor practice to do so, but
not as bad as a  zillion other things you can do wrong, such as writing
code whose result depends on the order of evaluation of arguments in an
expression etc.

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