Sealed classes and methods: Difference between revisions
→{{header|C}}: Simplified code a bit.
(→{{header|C}}: Spoke too soon, just figured out an easy way to do this.) |
(→{{header|C}}: Simplified code a bit.) |
||
Line 47:
void watchMovie(parent *p, typeid id) {
if (id ==
printf("%s is watching the movie...\n", p->name);
▲ printf("Sorry, %s, you are too young to watch the movie.\n", p->name);
▲ } else {
}
}
int main() {
parent p = { "Donald", 42 };
|