Hi, everyone!


I have a sample about using constructor to do type conversion.
In my sample, I change an int to type "A". I just want to learn
more deeply into this topic -- using constructor to do type
conversion. Are there some online materials that I can make a
reference?

BTW: Is the topic in Bjarne Stroustrup's "The C++ Programming language
special edition"? I can not find that topic in this book.


Here is my example:

--------
#include <iostream.h>

class A {

private:
int a;

public:
A (int a)
{
this->a = a;
}

void output()
{
cout << "a is: " << this->a << endl;
}
};

void functionA (A a)
{
a.output();
}

int main()
{
functionA (10);
return 1;
}
--------


Thanks in advance,
George