What Is Object Slicing in C++? Explanation, Examples, and How to Avoid It | CodeTrail