Код: Выделить всё
#include
class Vector {
public:
double x, y, z;
// Default constructor
Vector() : x(0), y(0), z(0) {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78550979/cant-understand-why-copy-constructor-gets-invoked[/url]