Quote Originally Posted by Paul McKenzie View Post
The destructor for the base class should be virtual.

Code:
#pragma once
#include"RandomNumber.h"

class Body
{
private:

	RandomNumber Random;
protected:
	
	int x;
	int y;
	int move;
	int moved;

public:

	Body(void);
	virtual ~Body(void);
Regards,

Paul McKenzie
so my .cpp will not change?

Code:
Body::~Body(void)
{
}
i will delete all the dynamic pointers in main