The compiler does not support the following destructor features:
The compiler does not support the following constructor features:
class C { int member;};
void f(void) {
C c1;
C c2 = c1;
-------^-----------ERROR: Illegal initialization of non-aggregate type
}
class A{
public:
int m;
S(int x):m(x){};
};
int f(A a) {return a.m};
int b = f(5) /*value of b should be 5 because of explicit conversion of f parameter(b = f(A(5)))*/
class A{
int m;
virtual void vf(){};
A(int) {vf()}
}
class B: public A{
void vf(){}
B(int i) : A(i) {}
}
B b(1); // this should result in call to A::vf()
class A{
int m;
virtual void vf(){};
void gf(){vf();}
A(int) {gf();}
}
class B: public A{
void vf(){}
B(int i) : A(i) {}
}
B b(1); // this should result in call to A::vf()
class A{
int m;
virtual int vf(){return 1;};
A(int):m(vf()){}
}
class B: public A{
int vf(){return 2;}
B(int i) : A(i) {}
}
B b(1); // this should result in call to A::vf()