Was ist ein Konvertierungskonstruktor in C ++? Wofür ist das?
Ich habe gehört, dass C ++ so etwas wie "Konvertierungskonstruktoren" oder "Konvertierungskonstruktoren" hat. Was sind das und wofür sind sie? Ich sah es in Bezug auf diesen Code erwähnt:
class MyClass
{
public:
int a, b;
MyClass( int i ) {}
}
int main()
{
MyClass M = 1 ;
}