| <<< | Index | >>> |
|
// point.h
class Point
{
public:
~Point(); // destructor
private:
int m_x;
int m_y;
};
|
// point.cpp
#include <iostream>
#include "point.h"
Point::~Point()
{
std::cout << "Goodbye...";
}
|
|
// main.cpp
#include "point.h"
void main()
{
Point pt;
}// ~Point() destructor is invoked here
|
| <<< | Index | >>> |