c++에서
int val(20);
초기화 문법인데
int는 리터럴인데 객ㄱ체도 아니고 이렇게 생성자 초기화가 됨!!?
앞뒤가 안 맞ㄴ는뎅
오옹 이런거도됨? 신박하네
int가 왜 리터럴임
int( 0 ); 가 가능하기 때문.
int를 초기화 할때 리터럴을 쓸 수 있는거지
클래스나 사용자 타입이 아니더라도 고유의 생성자가 있슴다.
http://stackoverflow.com/questions/5350125/constructor-of-type-int#3- dc App
lmgtfy.com/?q=cpp+int+constructor - dc App
오옹 이런거도됨? 신박하네
int가 왜 리터럴임
int( 0 ); 가 가능하기 때문.
int를 초기화 할때 리터럴을 쓸 수 있는거지
클래스나 사용자 타입이 아니더라도 고유의 생성자가 있슴다.
http://stackoverflow.com/questions/5350125/constructor-of-type-int#3
- dc App
lmgtfy.com/?q=cpp+int+constructor - dc App