How can I prevent code duplication?
I write utilities in c++, I have been working in this direction for half a year. Relatively new, I've been facing the problem of duplicate code in recent days.
How can I prevent code duplication?
I understand that it takes a lot of time, but I still don’t know how to do tests well, and there are still a lot of projects to write and they are similar