cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/24/21:36:35

From: gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: QUESTION: General Syntax
Date: 25 Feb 1997 01:35:09 GMT
Organization: Oxford University
Lines: 23
Message-ID: <5etfkd$pj2@news.ox.ac.uk>
References: <Pine DOT SOL DOT 3 DOT 91 DOT 970224190743 DOT 3403A-100000 AT world DOT evansville DOT net>
NNTP-Posting-Host: mc31.merton.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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()".
If you put the semicolon in, it becomes a prototype, and should
not have a body ({...}).

: I know this will be an easy one to answer, but I've 
: been hard at work looking for resources that cover the GCC Standard 
: Syntax, and I can't find any.  So if you could point me to some, I'd be 
: eternally grateful.  Thanks!

gcc uses almost standard C/C++ - any good book on the language will
be relevant to gcc. Don't get one on low-level PC-specific code,
though, because this invariably assumes you're using either Borland
C or Microsoft C, and will give you non-portable commands from these
compilers' vocabulary which gcc won't understand.

-- 
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.

- Raw text -


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