I am getting 'class' type redefinition, which I understand is because class A
is in both the header and the cpp file. which both look like this:
header.h
namespace NS {
class A : B {
// Definitions Here
}
}
main.cc
namespace NS {
class A : B {
void DoSomething(){}
void DoSomethingElse(){}
}
}
I have read that I need to convert the main.cc file to look like this:
namespace NS {
void A::DoSomething(){}
void A::DoSomethingElse(){}
}
I am not a huge fan of how that looks, so is there a way for me to format it like the first example without getting the redefinition error by maybe changing the header file?