I have classes that look like this (simplified)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
class Object {
public:
int width, height;
virtual void draw() {}
};
class Button : public Object {
public:
void draw() {
/* ... */
}
};
class Input : public Object {
public:
void draw() {
/* ... */
}
};
| |
if I have something like this...
Object objects[]
how can I call
draw()
on all of them?
Java has given me a break from things like this :]...
Plz tel me if im doin it wrong.
Last edited on