Question
Can a constructor be declared as static?

Answers

A static member function can be used without referring to a specific object, using only a class name. They have no ‘this’ pointer, so they cannot access class member data unless they are passed a ‘this’ pointer explicitly.
We can't declare constructors to be static. If a constructor was allowed to be static, it could be invoked without a ‘this’ pointer and therefore would not be able to build specific objects from raw storage.   Your Comment






Search
Can you Answer!!
  • Q To whom is the resignation letter of a State Public Service Commission member addressed?
  • Q What is the difference between char a[] = "string"; and char *p = "string";?
  • Q In West Virginia its illegal to snooze where
  • Q What is the significance of ods in biw?
  • Q Why is the term'Slave dynasty' an inaccurate term?
  • Q What is the difference between the function declarations below?  var foo = function(){    // some code  };    function bar(){    // some code  }; 
  • Q What is amplitude modulation?
  • Q What do we call the device which is used to locate submerged objects under sea?
  • Q How can a teacher engage in career-long competence development?
  • Q Do you have any experience with setting up displays?
  • Q What are the master-detail triggers?