Thread View: comp.std.c++
1 messages
1 total messages
Started by Roman Budzianowski
Thu, 06 Dec 1990 19:55
C++/C copatibility
Author: Roman Budzianowski
Date: Thu, 06 Dec 1990 19:55
Date: Thu, 06 Dec 1990 19:55
40 lines
1120 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads