Throw an exception. Constructors don’t have a return type, so it’s not possible to use
return codes. The best way to signal constructor failure is therefore to throw an exception.
How can I handle a constructor that fails?
Category: C Interview Question, C++ Questions | 4 views
0 responses so far!
-
There are no comments yet...Kick things off by filling out the form below.
