Consider the DUPoint class, the declaration of which is given below. Suppose this code appears in a file called DUPoint.h:
#include <string> class DUPoint { public: DUPoint (int x, int y); int getX () const; int getY () const; void setX (int x); void setY (int y); void print(); private: int x_; int y_; };
Is it true that you cannot declare an uninitialized DUPoint variable with an expression, such as DUPoint P; using this class as the current configuration since it does not have a zero constructor?
source share