www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/25/03:10:48

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: QUESTION: General Syntax
Date: Mon, 24 Feb 1997 21:42:17 -0800
Organization: Alcyone Systems
Lines: 22
Message-ID: <33127BB9.18332849@alcyone.com>
References: <Pine DOT SOL DOT 3 DOT 91 DOT 970224190743 DOT 3403A-100000 AT world DOT evansville DOT net> <5etfkd$pj2 AT news DOT ox DOT ac DOT uk>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

George Foot wrote:

> Zaphod Beeblebrox (zaphod AT evansville DOT net) wrote:
> 
> : Why won't this compile?  I get an unusual parser error at the first {.
> : How do I fix this?
> 
> Delete the semicolon after the ) and put "int " before "main()".

The lack of a return type is okay in this case; function prototypes or
declarations default to return type int if not specified.  It's unclear,
but it's perfectly legal ANSI C/draft standard C++ syntax.

You're right about the extraneous semicolon, of course.

-- 
       Erik Max Francis, &tSftDotIotE / email:  max AT alcyone DOT com
                     Alcyone Systems /    web:  http://www.alcyone.com/max/
San Jose, California, United States /    icbm:  37 20 07 N  121 53 38 W
                                   \
              "I am become death, / destroyer of worlds."
                                 / J. Robert Oppenheimer (quoting legend)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019