Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!ukc!dcl-cs!stephen From: stephen@comp.lancs.ac.uk (Stephen J. Muir) Newsgroups: net.lang.c++ Subject: C++ on existing C programs. Message-ID: <350@comp.lancs.ac.uk> Date: Wed, 13-Aug-86 20:41:06 EDT Article-I.D.: comp.350 Posted: Wed Aug 13 20:41:06 1986 Date-Received: Thu, 14-Aug-86 21:50:43 EDT Reply-To: stephen@comp.lancs.ac.uk (Stephen J. Muir) Organization: Department of Computing at Lancaster University, UK. Lines: 40 C++ is supposed to be upwards compatible with C. Can anybody, therefore, explain why the following does not compile (under 4.2): # include # include # include # include # include # include extern char *getlogin (); char *basename, *cp, **cpp, *holidays = "/usr/games/lib/holidays", /* format is dd/mm/yy */ holbuf [10], realgame [100] = "/usr/games/bin/", *sorry [] = { "Games may not be played on working days between 09:00 and 17:00.\n", 0 }, *scorers [] = /* games which use "-s" to print scores */ { "rogue", "robots", "hack", "rogomatic", 0 }; int fd = -1, wizard, group, ngroups = NGROUPS, goodguy, glist [NGROUPS]; /* rest of program deleted for clarity */ "wizard.c", line 25: error: syntax error "wizard.c", line 25: error: syntax error "wizard.c", line 25: error: syntax error "wizard.c", line 25: error: syntax error: type expected for vector glist 4 errors -- EMAIL: stephen@comp.lancs.ac.uk | Post: University of Lancaster, UUCP: ...!mcvax!ukc!dcl-cs!stephen | Department of Computing, Phone: +44 524 65201 Ext. 4120 | Bailrigg, Lancaster, UK. Project:Alvey ECLIPSE Distribution | LA1 4YR