4 ms·
It isn't. If you copy a value and change the copy, the original is unaffected.
by mgaunard 3y ago
It isn't. If you copy a value and change the copy, the original is unaffected.
- spacechild1 3y agoC++ classes in general are value types. The fact that instances might share a common resource does not change that. See also https://learn.microsoft.com/en-us/cpp/cpp/value-types-modern-cpp?view=msvc-170 https://learn.microsoft.com/en-us/cpp/cpp/value-types-modern....