In C++, if a class has a constructor which can be called with a single argument, then this constructor becomes conversion constructor because such a constructor allows automatic conversion to the class being constructed.
Example
class Test
{
private:
int x;
public:
Test(int i) {x = i;}
void show() { cout<<" x = "<<x<<endl; }
};
int main()
{
Test t(200);
t.show();
t = 300; // conversion constructor is called here.
t.show();
}
The above program prints:
x = 200
x = 300