Newsgroups: alt.comp.lang.learn.c-c++, comp.lang.c++
From: stan <smo...@exis.net>
Date: Fri, 7 Jan 2011 21:28:08 -0500
Local: Fri, Jan 7 2011 9:28 pm
Subject: Re: Frasncis Glassboro wrote.
Garrett Hartshaw wrote: <snip> > On 01/07/2011 02:06 PM, Paul wrote: >> It simply can't be done as the concept of virtual functions only lives Did you hear that? Sounded like "I'm mmeelllllllttttting" >> in the world of objects. >> Please show some basic code. I guarantee you cannot. > #include <iostream> > class C1 { > class C2 : public C1 { > int main () { > C1 a; //create a object of type C1 > (a.*p)(); //call the member function pointed to > return 0; > This code prints the following. > C1::f You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||