Click here to Skip to main content
15,918,967 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: displaying the files and folders in a list box Pin
Chandrasekharan P15-Oct-07 22:10
Chandrasekharan P15-Oct-07 22:10 
GeneralRe: displaying the files and folders in a list box Pin
Hamid_RT16-Oct-07 0:36
Hamid_RT16-Oct-07 0:36 
AnswerRe: displaying the files and folders in a list box Pin
Nelek15-Oct-07 20:47
protectorNelek15-Oct-07 20:47 
GeneralRe: displaying the files and folders in a list box Pin
David Crow16-Oct-07 2:55
David Crow16-Oct-07 2:55 
GeneralRe: displaying the files and folders in a list box Pin
Chandrasekharan P16-Oct-07 17:29
Chandrasekharan P16-Oct-07 17:29 
GeneralRe: displaying the files and folders in a list box Pin
David Crow17-Oct-07 3:56
David Crow17-Oct-07 3:56 
GeneralRe: displaying the files and folders in a list box Pin
Nelek29-Oct-07 22:01
protectorNelek29-Oct-07 22:01 
QuestionBase class pointer to Derived Class object?? Pin
Ash2015-Oct-07 20:25
Ash2015-Oct-07 20:25 
what is advantage of "Base class pointer to Derived Class object" ?

class Base
{
public:
Base(){ cout<<"Constructor: Base"<<endl;}
~base(){ cout<<"destructor="" :="" base"<<endl;}
void="" funbase()
{
cout="" <<"base="" function="" invoked"<<endl;
}
};
class="" derived:="" public="" base
{
public:
derived(){="" cout<<"constructor:="" derived"<<endl;}
~derived(){="" derived"<<endl;}
void="" funderived()
{
cout="" <<"derived="" invoked"<<endl;
}
};


int="" _tmain(int="" argc,="" _tchar*="" argv[])
{
cout<<"ashish"<<"\n";

base="" *var="new" derived();
delete="" var;

}


even="" though="" "var"="" points="" to="" derived="" class="" object="" ,="" it="" cannot="" access="" member="" i.e="" funderived().="" var="" can="" only="" base="" functions.

instead="" of="" why="" dont="" we="" use="" ,

base="" *check="new" base();
check-="">fun1();

I guess it is having same behaviour. Please let me know wht is advantage of using base class pointer to derived class object?

Thanks\
Ash.
AnswerRe: Base class pointer to Derived Class object?? Pin
Cedric Moonen15-Oct-07 20:33
Cedric Moonen15-Oct-07 20:33 
AnswerRe: Base class pointer to Derived Class object?? Pin
codeII15-Oct-07 20:49
codeII15-Oct-07 20:49 
GeneralRe: Base class pointer to Derived Class object?? Pin
Ash2015-Oct-07 22:19
Ash2015-Oct-07 22:19 
QuestionHow to create Webpage Viewer Pin
Soumyadipta15-Oct-07 19:53
Soumyadipta15-Oct-07 19:53 
AnswerRe: How to create Webpage Viewer Pin
Hamid_RT15-Oct-07 20:43
Hamid_RT15-Oct-07 20:43 
QuestionBrowser Control Pin
Soumyadipta15-Oct-07 19:44
Soumyadipta15-Oct-07 19:44 
Question[SOLVED] Read a file on click event Pin
CodingLover15-Oct-07 19:22
CodingLover15-Oct-07 19:22 
AnswerRe: Read a file on click event Pin
chandu00415-Oct-07 19:46
chandu00415-Oct-07 19:46 
GeneralRe: Read a file on click event Pin
CodingLover15-Oct-07 20:02
CodingLover15-Oct-07 20:02 
GeneralRe: Read a file on click event Pin
chandu00415-Oct-07 20:05
chandu00415-Oct-07 20:05 
GeneralRe: Read a file on click event Pin
CodingLover15-Oct-07 20:14
CodingLover15-Oct-07 20:14 
GeneralRe: Read a file on click event Pin
chandu00415-Oct-07 20:24
chandu00415-Oct-07 20:24 
GeneralRe: Read a file on click event Pin
CodingLover15-Oct-07 20:29
CodingLover15-Oct-07 20:29 
GeneralRe: Read a file on click event Pin
chandu00415-Oct-07 20:27
chandu00415-Oct-07 20:27 
GeneralRe: Read a file on click event Pin
CodingLover15-Oct-07 20:33
CodingLover15-Oct-07 20:33 
GeneralRe: Read a file on click event Pin
chandu00415-Oct-07 20:48
chandu00415-Oct-07 20:48 
AnswerRe: Read a file on click event Pin
Nishad S15-Oct-07 20:41
Nishad S15-Oct-07 20:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.