C++ examples for Class:Constructor
Get the default constructor back via the new keyword default
#include <string> using namespace std; class Employee//from www .ja v a2s .c om { public: Employee(const char *pName) { name = pName; } Employee() = default; string name; }; int main(int argcs, char* pArgs[]) { Employee noName; return 0; }