Created
November 12, 2012 16:57
-
-
Save Jack2/4060497 to your computer and use it in GitHub Desktop.
[C++]new_delete_example
This file contains hidden or 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 <iostream> | |
using namespace std; | |
class Jack2Box{ | |
public : | |
Jack2Box(){ | |
cout << "Jack2Box 오브젝트 생성" << endl; | |
} | |
~Jack2Box(){ | |
cout << "Jakc2Box 오브젝트 임무 종료" << endl; | |
} | |
}; | |
int main() | |
{ | |
Jack2Box *ptr_Jack2Box = new Jack2Box; | |
delete ptr_Jack2Box; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment