#include <iostream>
class test{
public:
test(double x=0, double y=0) : m_x(x), m_y(y) {}
double m_x, m_y;
};
void main(){
test t = (100.0, 0.0);
std::cout << t.m_x << " " << t.m_y << std::endl;
}
こうすると、
0 0
と表示されます。本当は
100 0
と表示されてほしいのですが、なぜこうなってしまうのでしょうか?