title: exception handling a constructor
body: <p>This was an interview question of me.</p>
  
  <p>Surprisingly i never thought of this kinda question to myself.</p>
  
  <p>can we have exception handling inside a constructor c++?</p>
  
  <p>in tense and not thinking much i said "yes we could probably do it in a constructor.lets say we are allocating some memory using new operator to a pointer member and it throws a bad alloc exception,in this way there is a possibility of exceptions being raised"</p>
  
  <p>Then later i thought that constructors can never return a value.So how can an exception inside a constructor caught.now i am asking this to myself!</p>
  
  <p>can anybody pls help me to come out of this confusion?</p>