12-Decons - ~Point() { delete x; delete y; } }; void test()...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> using namespace std; class Point { private: float *x, *y; public: Point(float x1, float y1) { x = NULL; y = NULL; }
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ~Point() { delete x; delete y; } }; void test() { Point x(1.1f, 2.0f); } int main (void) { test(); return 0; }...
View Full Document

Ask a homework question - tutors are online