Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
Richard MacCutchan9-Jun-12 22:17
mveRichard MacCutchan9-Jun-12 22:17 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
Aescleal9-Jun-12 22:22
Aescleal9-Jun-12 22:22 
GeneralRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
likescr713-Jun-12 3:27
likescr713-Jun-12 3:27 
QuestionRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
CPallini10-Jun-12 21:06
mveCPallini10-Jun-12 21:06 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
Eytukan11-Jun-12 4:42
Eytukan11-Jun-12 4:42 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
Eytukan11-Jun-12 4:44
Eytukan11-Jun-12 4:44 
AnswerRe: Example of CONSTRUCTOR and DESTRUCTOR in derived class ? ? ? Pin
jschell11-Jun-12 8:02
jschell11-Jun-12 8:02 
QuestionData Encapsulation Pin
pix_programmer8-Jun-12 21:12
pix_programmer8-Jun-12 21:12 
Hi!
Can any one explain with reference the following code:

(1)Where Data is encapsulated (At which line of code does the encapsulation)?

(2) Where Data Abstraction is done(At which line of code does the abstraction)?



<pre>
#include "iostream"

using namespace std;

class Rectangle
{
private:
float width,height,Area;
public:
Rectangle()
{
width = 35.0;
height = 25.0;
}

Rectangle(float w, float h)
{
width = w;
height =h;
}
void GetArea()
{
Area = width * height;
cout<<"Area of the rectangle is \t"<<Area<<endl;
}
~Rectangle()
{
}
};

void main()
{
Rectangle rect(55.0,35.0);
rect.GetArea();
}
</pre>

-- modified 9-Jun-12 3:20am.
AnswerRe: Data Encapsulation Pin
Richard MacCutchan8-Jun-12 22:07
mveRichard MacCutchan8-Jun-12 22:07 
AnswerRe: Data Encapsulation Pin
Aescleal9-Jun-12 9:40
Aescleal9-Jun-12 9:40 
QuestionMy assignment aggregation, composition and inheritance Pin
David96378-Jun-12 19:23
David96378-Jun-12 19:23 
AnswerRe: My assignment aggregation, composition and inheritance Pin
Richard MacCutchan8-Jun-12 22:02
mveRichard MacCutchan8-Jun-12 22:02 
GeneralRe: My assignment aggregation, composition and inheritance Pin
David96379-Jun-12 0:13
David96379-Jun-12 0:13 
GeneralRe: My assignment aggregation, composition and inheritance Pin
Richard MacCutchan9-Jun-12 0:20
mveRichard MacCutchan9-Jun-12 0:20 
AnswerRe: My assignment aggregation, composition and inheritance Pin
Aescleal9-Jun-12 10:09
Aescleal9-Jun-12 10:09 
QuestionBuild error with Visual C++ 2010 Pin
Falconapollo8-Jun-12 17:10
Falconapollo8-Jun-12 17:10 
AnswerRe: Build error with Visual C++ 2010 Pin
Richard MacCutchan8-Jun-12 22:53
mveRichard MacCutchan8-Jun-12 22:53 
GeneralRe: Build error with Visual C++ 2010 Pin
Falconapollo8-Jun-12 23:05
Falconapollo8-Jun-12 23:05 
GeneralRe: Build error with Visual C++ 2010 Pin
Richard MacCutchan8-Jun-12 23:29
mveRichard MacCutchan8-Jun-12 23:29 
GeneralRe: Build error with Visual C++ 2010 Pin
Falconapollo8-Jun-12 23:35
Falconapollo8-Jun-12 23:35 
AnswerRe: Build error with Visual C++ 2010 Pin
Stephen Hewitt10-Jun-12 1:17
Stephen Hewitt10-Jun-12 1:17 
QuestionIf CDialog is destroyed is UI CWinThread created While object was alive get destroyed as Well Pin
ForNow8-Jun-12 2:31
ForNow8-Jun-12 2:31 
AnswerRe: If CDialog is destroyed is UI CWinThread created While object was alive get destroyed as Well Pin
«_Superman_»8-Jun-12 2:46
professional«_Superman_»8-Jun-12 2:46 
GeneralRe: If CDialog is destroyed is UI CWinThread created While object was alive get destroyed as Well Pin
ForNow8-Jun-12 10:52
ForNow8-Jun-12 10:52 
GeneralRe: If CDialog is destroyed is UI CWinThread created While object was alive get destroyed as Well Pin
«_Superman_»8-Jun-12 16:11
professional«_Superman_»8-Jun-12 16:11 

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.