🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c++
Article #282

C++ on existing C programs.

#282
From: Stephen J. Muir
Date: Thu, 14 Aug 1986 00:41
40 lines
1772 bytes
C++ is supposed to be upwards compatible with C.  Can anybody, therefore,
explain why the following does not compile (under 4.2):

# include <sys/param.h>
# include <sys/time.h>
# include <sys/file.h>
# include <stdio.h>
# include <strings.h>
# include <grp.h>

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
Technical Details
Message-ID: <350@comp.lancs.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!ukc!dcl-cs!stephen

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!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