Skip to content

Instantly share code, notes, and snippets.

@HungMingWu
Created December 5, 2012 07:44
Show Gist options
  • Save HungMingWu/4213523 to your computer and use it in GitHub Desktop.
Save HungMingWu/4213523 to your computer and use it in GitHub Desktop.
Incomplete class types
#include "deleter.h"
void delete_object(Object* p)
{
delete p;
}
class Object;
void delete_object(Object* p);
#include "object.h"
#include "deleter.h"
int main()
{
Object *pObj = new Object;
delete_object(pObj);
return 0;
}
class Object {
public:
~Object() {}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment