Can we write try catch block in constructor? Link list ,stack ,queue, virtual function ,pointers
Anonymous
Like any method can throw exception, a constructor can also throw a exception since it is also a method which is invoked when a object is created. yes we can write a try catchblock within a constructor same as we can write in inside a method.
Check out your Company Bowl for anonymous work chats.