Click here to Skip to main content
15,924,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Base Class Reference Pin
sunit514-Jun-06 0:41
sunit514-Jun-06 0:41 
GeneralRe: Base Class Reference Pin
John R. Shaw14-Jun-06 1:00
John R. Shaw14-Jun-06 1:00 
GeneralRe: Base Class Reference Pin
toxcct14-Jun-06 1:32
toxcct14-Jun-06 1:32 
GeneralRe: Base Class Reference Pin
John R. Shaw14-Jun-06 1:54
John R. Shaw14-Jun-06 1:54 
AnswerRe: Base Class Reference Pin
John R. Shaw14-Jun-06 0:55
John R. Shaw14-Jun-06 0:55 
GeneralRe: Base Class Reference Pin
Sarath C14-Jun-06 1:19
Sarath C14-Jun-06 1:19 
GeneralRe: Base Class Reference Pin
John R. Shaw14-Jun-06 1:39
John R. Shaw14-Jun-06 1:39 
AnswerRe: Base Class Reference [modified] Pin
_AnsHUMAN_ 14-Jun-06 1:07
_AnsHUMAN_ 14-Jun-06 1:07 
Just to make things clear:
There are 3 classes A,B and C
B and C are derived from A : A has a virtual fn Display() and an int variable is declared in each class i,j and k respectively.
** And yes each class has a constructor where i assign a value to the variable's i,j,k respectively.
When we use pointers we can call :
    B b;
C c;
A* a=&c;
a->display(); // Prints value of K
a=&b;
a->display(); // Prints value of J

But when we use references :
B b;
C c;
A& a=c;
a.display(); // Value of K is printed
a=b;
a.display(); // Again the value of K is printed


Somethings seem HARD to do, until we know how to do them.
Wink | ;-)
_AnShUmAn_


-- modified at 7:09 Wednesday 14th June, 2006
GeneralRe: Base Class Reference Pin
Sarath C14-Jun-06 1:22
Sarath C14-Jun-06 1:22 
AnswerRe: Base Class Reference Pin
Laxman Auti14-Jun-06 2:28
Laxman Auti14-Jun-06 2:28 
AnswerRe: Base Class Reference Pin
Naveen14-Jun-06 1:21
Naveen14-Jun-06 1:21 
QuestionReduce the size of ssleay.lib and libeay.lib file [modified] Pin
sunit514-Jun-06 0:25
sunit514-Jun-06 0:25 
AnswerRe: Reduce the size of ssleay.lib and libeay.lib file Pin
Christian Graus14-Jun-06 1:07
protectorChristian Graus14-Jun-06 1:07 
Questionchar* to CString [modified] Pin
shuchigo_jane14-Jun-06 0:24
shuchigo_jane14-Jun-06 0:24 
AnswerRe: char* to CString [modified] Pin
Naveen14-Jun-06 0:28
Naveen14-Jun-06 0:28 
GeneralRe: char* to CString Pin
shuchigo_jane14-Jun-06 0:30
shuchigo_jane14-Jun-06 0:30 
GeneralRe: char* to CString Pin
Naveen14-Jun-06 0:43
Naveen14-Jun-06 0:43 
AnswerRe: char* to CString [modified] Pin
sunit514-Jun-06 0:29
sunit514-Jun-06 0:29 
GeneralRe: char* to CString Pin
shuchigo_jane14-Jun-06 0:32
shuchigo_jane14-Jun-06 0:32 
GeneralRe: char* to CString Pin
sunit514-Jun-06 0:36
sunit514-Jun-06 0:36 
GeneralRe: char* to CString Pin
super_ttd16-Jun-06 8:21
super_ttd16-Jun-06 8:21 
AnswerRe: char* to CString Pin
Eytukan14-Jun-06 0:32
Eytukan14-Jun-06 0:32 
GeneralRe: char* to CString Pin
shuchigo_jane14-Jun-06 0:32
shuchigo_jane14-Jun-06 0:32 
GeneralRe: char* to CString Pin
sunit514-Jun-06 0:35
sunit514-Jun-06 0:35 
JokeRe: char* to CString Pin
Eytukan14-Jun-06 0:44
Eytukan14-Jun-06 0:44 

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.