Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!tektronix!tekcrl!tekchips!danw From: danw@tekchips.LABS.TEK.COM (Daniel E. Wilson) Newsgroups: comp.lang.c Subject: Re: C++ and ANSI C Message-ID: <3934@tekcrl.LABS.TEK.COM> Date: 4 May 89 21:02:48 GMT References: <12005@paris.ics.uci.edu> <44100029@hcx2> <1989May4.001911.3382@utzoo.uucp> Sender: ftp@tekcrl.LABS.TEK.COM Lines: 25 In article <1989May4.001911.3382@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes: > In article <44100029@hcx2> daver@hcx2.SSD.HARRIS.COM writes: > >From "Computerworld" (4/24/89, p. 31): > > "... A key selling point of C++ is its relationship with the established C > > language. It includes ANSI-standard C as a subset, as does Objective C, ..." > > To break the suspense, the two big incompatibilities are: > > 1. "extern foo();" means (so to speak) "extern foo(...);" in ANSI C and > "extern foo(void);" in C++ > > 2. declaring a struct or union tag in C++ essentially does an implicit > typedef on that identifier as well > -- Number 1 is incorrect since C++ uses '...' to indicate that the number and type of arguments is unknown. The void keyword in ANSI C indicates that the function takes no arguments. No arguments in the prototype in C++ means that there are no arguments. Number 2 is correct since the struct and union concepts in C++ are subsets of the class concept. The class concept requires that a class be a new data type. Dan Wilson