Created
December 5, 2012 07:44
-
-
Save HungMingWu/4213523 to your computer and use it in GitHub Desktop.
Incomplete class types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "deleter.h" | |
void delete_object(Object* p) | |
{ | |
delete p; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Object; | |
void delete_object(Object* p); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "object.h" | |
#include "deleter.h" | |
int main() | |
{ | |
Object *pObj = new Object; | |
delete_object(pObj); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Object { | |
public: | |
~Object() {} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment