When I meant C, was not OO in C... I'm getting now into OO programing and
the one I said was one doubt I come up with.
I have now realized that what I want is almost imposible ;)
The think is like. There is a class that is a door. But there are many
possible doors and ways to open it. What I was trying to say is that any
door should implement a method named Open, no matter the parameters they
are required. Lets say, normal door will use Open with a key and then a
garage door will use Open with a remote controller. But both are Doors
and should have an Open method.
From the example of fstream, I realize that this characteristic cannot be
inherited as the programming language doesn't allow it.
TA. Sorry for the newbie discussion ;)
Jens Theisen <jt***@arcor.dewrote in news:44eb51fd$0$10147$9b4e6d93
@newsspool1.arcor-online.net:
>George wrote:
>See the point. If the standard library does that, why do I should it
in
>another way? Probably there should be no way.
I still don't understand what you really mean.
You said you were coming from C, so here is your OO design in C:
typedef struct
{
void (*Open) (void);
} A_interface;
void B_open(void);
void C_open(int);
A_interface B_impl = { &B_Open };
A_interface C_impl = { &C_Open }; // type error
This is also meaningless.
Jens
--
Saludos a todos
#
# Contra el terrorismo
#