Let's say you have made a class called threevector which takes stores three doubles.
Then you define another class, a fourvector, which stores four doubles.
I have seen this syntax used for the constructor of the fourvector:
fourvector(double fourth, threevector one_two_three): threevector (one_two_three)
{
fourth = 0.0;
}
I understand that the fourvector object takes in a double and a threevector as its arguments. But I haven't defined any constructor called threevector (one_two_three) in the threevector class. So what does the compiler do?