- Reason
- Correction
- Example
- Passing parameters to a constructor
Error 1046: Wrong parameter for the constructor of the class
You are trying to define an object of a class. The number of parameters does not correspond to the number of parameters expected by the class. Check the parameters expected by the constructor of the class and modify your code. Passing parameters to a constructor Code triggering the error
// -- Click code on BTN_CreateCircle pDrawing is Circle dynamic = new Circle(gpDrawing, x, y, width)
// -- Constructor of "Circle" class PROCEDURE Circle::Constructor(pt, aa, bb, cc, dd)
Possible correction Pass the expected number of parameters.
// -- Click code on BTN_CreateCircle pDrawing is Circle dynamic = new Circle(gpDrawing, x, y, width, height) // -- Constructor of "Circle" class PROCEDURE Circle::Constructor(pt, aa, bb, cc, dd)
This page is also available for…
|
|
|
|