E2037 The constructor 'constructor' is not allowed (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

Constructors of the form

  X(X);  //{ Error
};

are not allowed.

This is the correct way to write a copy constructor:

class X {
  X(const X&);// Copy constructor
};