On Monday, 22 December 2014 at 23:14:44 UTC, Elie Morisse wrote:
 • Structs

testClass cls = new testInherit;

This should be written

testClass* cls = new testInherit;

In C++ struct and class differ only in symbol mangling. They are both value types, support inheritance, copy constructors etc. By looking at the declaration you can't decide if a class should be used as value type or reference type, so better treat it as value type like in C++.

Reply via email to