class 동적할당 질문

ewqqwe의 이미지

class를 동적할당 할 때 아래 1번과 2번의 차이가 뭔가요?

class test{...};

1번) test *ptr = new test();
2번) test *ptr = new test;

kukyakya의 이미지

test의 타입에 따라 조금 다릅니다.

자세한 내용은 http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-new 참고하세요.