Skip to content

Instantly share code, notes, and snippets.

@Jack2
Created November 12, 2012 16:57
Show Gist options
  • Save Jack2/4060497 to your computer and use it in GitHub Desktop.
Save Jack2/4060497 to your computer and use it in GitHub Desktop.
[C++]new_delete_example
#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