[C/C++] Remind! Limitation of constructor; It doens't give return value!..

Language/C&C++ 2009.05.15 22:30
[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]

Constructor doesn't give return value!.
Yes, we can pass pointer as parameter and get value. But it's not good shape.
So, we shouldn't write code that may prevent class from instanciation in constructor. And, we may need additional interface for initializing that can give return value - like 'int init()'.
tags : ,
Trackback 0 : Comment 0

티스토리 툴바