auto_ptr<int> pia(new int[20]); //#1
auto_ptr<string> (new string); //#2
int rigue=7;
auto_ptr<int> pr(&rigue); //#3
auto_ptr dbl (new double); //#4
위에 있는 코드들 내가 생각 추측하기에는 #4 빼고는 다 컴파일 가능할 것같은데(컴파일은 다되니)
개념적으로나 구문상으로는 어떤것같아?
auto_ptr<int> pia(new int[20]); //#1
auto_ptr<string> (new string); //#2
int rigue=7;
auto_ptr<int> pr(&rigue); //#3
auto_ptr dbl (new double); //#4
3이 됨??
되겠지 시팔
deprecated된 auto_ptr로 고생한다. 레가시 코드 유지 보수할거 아니면 크게 고민할 필요가 없음. - Make PHP Great Again!
시발 auto_ptr에서 내렸다 - return 0;
참고로 auto_ptr은 C++17 부로 공식적으로 삭제되니까 참고하셈 - return 0;