I'm having a class that looks like:
class A {
public:
A(float v)
{
A::v = v;
}
float v;
float set(float v)
{
A::v = v;
return v;
}
float get(float v)
{
return A::v;
}
};
Then I instantiate 2 objects of class A:
A* a = new A(1.0);
A* b = new A(*a);
Why are there no errors when my Class A doesn't have a constructor which takes a class A?