2 hours ago, fleabay said:Please tell me what you think the purpose of include guards are in header files if there is no problem with multiple declarations of the same class in a translation unit.
Include guards are used to prevent cycle inclusion, not to (and not need to) prevent multiple declarations (not definitions). Though as frob said, most class declarations are also class definitions so they can't be multiple in one translate unit.
Here is an article on declaration vs definition.