If I have a class Rectangle
class Rectangle{
private:
double width;
double height;
public:
void Set(double w , double l){
width = w;
height = l;
}
};
and I decleare an object such:
Rectangle *Obj;
and then use Set function as
Obj->Set(6.0, 9.0);
The program runs and displays no error, whereas according to me it should displayvan error, as i have not initialised the pointer.