🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #629

C++/C copatibility

#629
From: Roman Budzianowski
Date: Thu, 06 Dec 1990 19:55
40 lines
1120 bytes
Yes, I read the ARM, but would like to hear your opinion.

I want to interface to a binary C library from C++. The C library
creates "objects" of the following structure:

struct part1 {
	atype1 a;
	atype2 b;
};
struct object1 {
	struct part1 A;
};

struct part2 {
	atype c;
};

struct object2 {
	struct part1  A;
	struct part2  B;
};

Assume the types atype{n} are primitive.

Can I access those "objects" from C++ using the following class definitions:

class object1 {
	atype1 a;
	atype2 b;
};

class object2 : public object1 {
	atype c;
};


It works fine in g++ and cfront 2.0, but a comment in ARM got me confused.
I am not using virtual functions.

Thanks.
Technical Details
Message-ID: <1990Dec6.195541.10470@hri.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bu.edu!bbn.com!nic!hri!sparc17!roman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bu.edu!bbn.com!nic!hri!sparc17!roman
From: roman@hri.com (Roman Budzianowski)
Newsgroups: comp.std.c++,comp.lang.c++
Subject: C++/C copatibility
Message-ID: <1990Dec6.195541.10470@hri.com>
Date: 6 Dec 90 19:55:41 GMT
Sender: news@hri.com (News Admin)
Reply-To: roman@hri.com (Roman Budzianowski)
Organization: Horizon Research
Lines: 40