//============================================================================
// Name : class_point.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
class Point {
private :
double x,y,r;
public :
Point(double x,double y,double r);
~Point() {
x=y=r=0;
cout<<"ended sir";
}
double get_radius();
};
Point::Point(double x,double y,double r) {
this->x = x;
this->y = y;
this->r = r;
}
double Point::get_radius() {
return this->r;
}
int main() {
Point p(1,2,30);
cout<<p.get_radius();
return 0;
}
// Name : class_point.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
class Point {
private :
double x,y,r;
public :
Point(double x,double y,double r);
~Point() {
x=y=r=0;
cout<<"ended sir";
}
double get_radius();
};
Point::Point(double x,double y,double r) {
this->x = x;
this->y = y;
this->r = r;
}
double Point::get_radius() {
return this->r;
}
int main() {
Point p(1,2,30);
cout<<p.get_radius();
return 0;
}