Description of this paper

Loading

Write a C++ program that shows proper use of pointers to classes-(Answered)

Description

Step-by-step Instant Solution


Question

Write a C++ program that shows proper use of pointers to classes (For simplicity, use a rectangle as your class ).


#include <iostream>

 

using namespace std;

 

class Rectangle

 

{

 

private:

 

int length;

 

int breadth;

 

public:

 

Rectangle()

 

{

 

length = 0;

 

breadth = 0;

 

}

 

void set_values (int a, int b)

 

{

 

length = a;...

 

Paper#9257077 | Written in 27-Jul-2016

Price : $16
SiteLock